C# Constructors Tutorial | Mosh

preview_player
Показать описание
Learn and understand constructors in C#

SUBSCRIBE FOR MORE VIDEOS!

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

Clear voice, clear audio quality, good display resolution and last but not least good content presented in a pedagogical way, thanks!

drabantorgreyhound
Автор

This was very smooth and easy to follow, thank you!


For those not using ReSharper when making a new class do not add a namespace and if it has one remove it or your class will not work!

leuk
Автор

Thank you for your tutorials. They have been very helpful. If I may offer something in return, hold down "Ctrl + Shift + A". That is the keyboard shortcut for creating a "new something" for example the first item is often a new class. Just title it and hit enter. Saves time manually right clicking and searching. Thank you again for your help :)

tollinroth
Автор

If you get an error when running the code, double check that you and not with a capital C. if you use capital C you try to output the class ID and not the object you created from the class.

olekristianrannekleiv
Автор

0:06 - What is a constructor?
0:15 - Why need a constructor?
0:25 - Declare constructors
3:28 - Constructor overloading
4:49 - Demo

XXIcenturyblood
Автор

"you should code like a ninja"....yes yes this is exactly what i want

DarthJeremy
Автор

Why not.. In the Costumer Class, as a property.. you don't type this =
public List<Order> Orders = new Lisy<Order>() ;
And it will be always initialized without using a Constructor. Why not?

bogdanmitroii
Автор

Good tutorial. Resharper is great but right clicking add class isn't a big deal, don't turn it into one. Most people here aren't professionals we are just here to learn. It's good to learn how to do things manually especially as newbies.

MrBaiins
Автор

This was very helpful! Especially how you go thru the examples step by step. But furthermore, you provide best practice too. Superb!

sunova_
Автор

Hi Mosh,
Your Tutorials are incredibly Perfect! Thanks a lot.

I really Suggest everyone to try them!!

babaktirgar
Автор

Thank you. I did not know that when we create a constractor, the default one disappears and we need to declare parametrless constractor. You answered the question I had so many troubles with)) I wish I watched this earlier)) Thank you

johnconnor
Автор

That's what i call a great video. Excellent job! Simple and well explained, even a kid can understand it

preslavdelchev
Автор

After watching the tutorial I understand the 'this' explanation within 10min. Awesome!

CrazyUnknownObject
Автор

Great tutorial for constructors concept, thanks a lot!
I just got a bit confused at the end when you describe about list of orders, it could be better to put an example there (rather than empty list maybe?).

khazar
Автор

"Code like a Ninja"! This is the qoute that will form my career!

txyodjg
Автор

Thank you mate, u made constructors sooo easy to understand and perfect please keep providing these videos ^_^

The_DLK
Автор

Thanks. Very good info. I had to find another c# tutorial for constructors and I found you. I learned a lot. Going to subscribe.

emanandchill
Автор

You can tell it's a paid course. Very detailed and considerate. Thank you.

BijouBakson
Автор

Hi Mosh, thank you for the great video!

I have a question:
is it wrong to initialize variables or objects once you declare them instead of doing that in the constructor??

Thanks in advance!

AliDali
Автор

This is the best explanation of C# concepts I have ever seen. Keep up the good work!

jjovanw