Intro To Class Libraries in C#

preview_player
Показать описание
The class library project type in C# is probably the most important project type in C#. Every other project relies on a series of class libraries. But with it being so foundational, it is often overlooked. In this video, we will look at what a class library is, how to use it in various projects, and how to get the most benefits out of it.

0:00 - Intro
0:59 - Class Library projects explained
6:37 - Creating a Class Library project
11:06 - Why and how to use Class Library
18:35 - What is a Class Library and how to build one
22:30 - Using Class Library with an Application (Console App)
28:00 - Value of Class Library
32:42 - Using Class Library with an Application (Windows Forms App)
38:43 - Summary of Class Library Usage in different Applications
44:41 - Class Library sharing, versions and NuGet packages
49:40 - Project Dependencies
55:44 - Summary and final remarks

Рекомендации по теме
Комментарии
Автор

Got up this morning to have coffee, found this in my feed!!!! Your channel is state of the art Tim. You don't make assumptions about your users and always explain so clearly. Roll on 1 million subs is what I say, you surely deserve it!!

Duelweb
Автор

The best C# tutorials on YouTube. Thank you sir for all your wisdom.

Ellehsdee
Автор

As I was learning Clean Architecture, I had no idea what and why Class Libraries and Interfaces were used. I now have a better understanding of the context thanks to you.

ParasizAsker
Автор

This video is awesome. I had no idea what class libraries are before I watched this video. But after watching this I have cleared all doubts and myths about class library. Thanks Tim Corey.

ranjanadissanayaka
Автор

Thank you so very much for being one of the backbones in the c# dev community.

BrokenSword
Автор

Well isn't this just a pickle. As a hobbyist coder, I have made a lot of bad coding decisions. After watching several of your DB/SQL videos, and then this one, I now have to do a LOT of rewriting and code organization. I love your videos. And plan on purchasing a course or 2. Your ideas/practices make a ton of sense and the way you present them is awesome. Thank you for what you do. And everyone should watch the vid on what you use the money for.

sgtbarak
Автор

0:00 - Intro
0:59 - Class Library projects explained
6:37 - Creating a Class Library project
11:06 - Why and how to use Class Library
18:35 - What is a Class Library and how to build one
22:30 - Using Class Library with an Application (Console App)
28:00 - Value of Class Library
32:42 - Using Class Library with an Application (Windows Forms App)
38:43 - Summary of Class Library Usage in different Applications
44:41 - Class Library sharing, versions and NuGet packages
49:40 - Project Dependencies
55:44 - Summary and final remarks

RalfsBalodis
Автор

Thank you for your wide range of helpful videos for programing in C#.

Bernd_aus_Isen
Автор

This channel is the nexus of C# programming wisdom. Thank you so much, Mr. Corey!
Regards to libraries and Clean Architecture classical approach (four layers: Domain, Application or Use Cases, Infrastructure and Presentation) can you tell me folks or Mr. Corey if it’s still valid and not obsoleted? Many people nowadays are saying that it’s better to use Sliced architecture (separate library for a feature as far as I concerned) in most of the cases but frankly I think that it makes things more complicated.

torrvic
Автор

What a timing!!!! Thanks for posting this, i really needed it!♥️

gahshunker
Автор

Great Video! I have plenty of Class Libraries I use, some of them are my own, some of them are NuGet Package's. I don't like using MVVM Libraries, I write my own implementation of it. (I DO NOT write MVVM from scratch all the time, that is way too much work.) I have a Notify and Item class that implements the IPropertyChanged. It's very useful making Model's, ViewModel's, and Custom List types. I also have a WPF Libary I use to clean up some of it's... plumbing. I don't really use Windows Forms anymore for new projects, although I do understand if people still want to use it. I am looking at the new WinUI(Cough: Upgraded UWP) framework. I do still use UWP, just for the Map Control. (You can do some cool things with that control)

ABMedia
Автор

Hi Tim, thanks for your effort. I think this concept has already been covered long time ago on your channel. I would love to see new C# concepts which have not been touched by C# instructors yet.

saadaldulaijan
Автор

I hope to see thousands of videos from you.

SinaDelta
Автор

Tim, fantastic content. It would be great if you included interfaces to the clas library as many times you may not know all the methods available in the dll.

artyspost
Автор

Great explanation, thank you!helped a lot!

vargaszilvia
Автор

I use class library projects for a lot for my AutoCAD plugins. What I always fall into to is curb-stomping DRY by making my methods too specific to a thing I am doing.

The section in this video about dependencies reminded me of something I really messed up and that was shared projects and crazy dependency loops I somehow set myself up with. I ended up putting code in my shared libraries that had dependencies on AutoCAD .dlls that were being referenced by the projects that I was referencing the shared library with, and then THOSE projects were referenced by projects that didn't need AutoCAD .dlls but because a shared project compiles itself into every project that it's referenced to, I ended up having to add AutoCAD .dlls to projects in my solution that had nothing to do with AutoCAD just to get them to compile.

I think I should stop using shared projects lol. (or learn how to use them correctly).

Rick-tgoy
Автор

My interpretation from the second section is that the "Class Library" ("...for creating a class library that targets .NET or .NET Standard") is the best one to use for .NET Core projects as well - is that right? There used to be a Library choice that explicitly said it could be used for .NET Core - not anymore. Thanks for the videos Tim!

josephh
Автор

Thank you Tim. I keep learning everyday I see your video.
I want to make a request please.
Can you help with video tutorial on how to use documentation when writing a program?
Documentation is very important, sadly most of of don't know how to use it. What to search for and so on.

MegaSkahn
Автор

Thank you for sharing such in depth knowledge sessions.. I think I know stuff clearly until I go through your videos 😂

kifayat
Автор

I didn't know that trick with the namespace. Thank you!

kitsurubami