Learn and understand constructors in C# 🔥Get the COMPLETE Course: bit.ly/2LhL39u SUBSCRIBE FOR MORE VIDEOS! / @programmingwithmosh STAY IN TOUCH / programmingwithmosh / moshhamedani
Пікірлер: 160
@drabantorgreyhound66137 жыл бұрын
Clear voice, clear audio quality, good display resolution and last but not least good content presented in a pedagogical way, thanks!
@pspicer7775 жыл бұрын
Drabantor Greyhound Your comment is interesting as it is surprising how often these types of videos are unusable because they miss the mark on one of your criteria.
@dweebosupremo59045 жыл бұрын
i actually feel that the voice is too bass-y and hard to understand.
@Rovsau4 жыл бұрын
This()
@ppogd97953 жыл бұрын
my mom asked on 13 o-clokc. what dosse ""pedagogical """""""" menanmean
@ppogd97953 жыл бұрын
ow i q on q q# me fulenrt s
@leuk23895 жыл бұрын
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!
@tollinroth59393 жыл бұрын
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 :)
@MrBaiins5 жыл бұрын
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.
@CrazyUnknownObject Жыл бұрын
After watching the tutorial I understand the 'this' explanation within 10min. Awesome!
@sunova_2 жыл бұрын
This was very helpful! Especially how you go thru the examples step by step. But furthermore, you provide best practice too. Superb!
@preslavdelchev12036 жыл бұрын
That's what i call a great video. Excellent job! Simple and well explained, even a kid can understand it
@DarthJeremy3645 жыл бұрын
"you should code like a ninja"....yes yes this is exactly what i want
@lukefox8365 жыл бұрын
Thank you for the dark background.
@johnconnor97876 жыл бұрын
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
@BijouBakson2 жыл бұрын
You can tell it's a paid course. Very detailed and considerate. Thank you.
@jjovanw6 жыл бұрын
This is the best explanation of C# concepts I have ever seen. Keep up the good work!
@XXIcenturyblood Жыл бұрын
0:06 - What is a constructor? 0:15 - Why need a constructor? 0:25 - Declare constructors 3:28 - Constructor overloading 4:49 - Demo
@The_DLK6 жыл бұрын
Thank you mate , u made constructors sooo easy to understand and perfect please keep providing these videos ^_^
@PouryaKamyarfard Жыл бұрын
"Code like a Ninja"! This is the qoute that will form my career!
@moldovandorin61875 жыл бұрын
mosh...you are a wonder of the universe
@babaktirgar7 жыл бұрын
Hi Mosh, Your Tutorials are incredibly Perfect! Thanks a lot. I really Suggest everyone to try them!!
@emanandchill7 жыл бұрын
Thanks. Very good info. I had to find another c# tutorial for constructors and I found you. I learned a lot. Going to subscribe.
@dominiquedevries99724 жыл бұрын
You are the best with Visual Studio!
@danieliglesias58054 жыл бұрын
Finally a really nice tutorial about constructors, thanks!
@investingwitha-aron80553 ай бұрын
Clear and understandable. Thank you. I subscribed.
@gregkoonce30597 жыл бұрын
Code like a Ninja!
@olekristianrannekleiv7622 жыл бұрын
If you get an error when running the code, double check that you Console.WriteLine(costumer.ID) and not console.WriteLine(Costumer.ID) 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.
@namronmanelok41193 жыл бұрын
This is really easy to follow and understand. Excellant!
@brunoh16735 жыл бұрын
great tutorial ! Mosh you are a programming genius!
@HeyMr.OO7 Жыл бұрын
Best coding instructor
@NestedMango6 жыл бұрын
Great tuto..Sir...By using C# We can Make 2d and 3d game on Unity game engine. Unity is free.
@miablazekovic11256 жыл бұрын
Super awesome tutorial, thank you so much! :)
@jalalzoon44476 жыл бұрын
yahh! it is.
@sevensrikanth5 жыл бұрын
code like a ninja... well said...
@owencoopersfx3 жыл бұрын
Excellent explanation. Thank you 🙏
@rtridico9116 ай бұрын
Great video! Thank you so much!
@pritamd7k Жыл бұрын
Great , as usual Mosh! Looking for more videos on c# containing xUnit test case advance methods.
@robertmarczak39914 жыл бұрын
Another Good one. Thanks Mosh.
@tonismith14456 жыл бұрын
So this is definitely more advanced topic than I am ready for. About half way through I'm literally just sitting there wondering what the heck he is even doing because I have no idea what constructors are and these other advanced topics. I'm going do some more reading and practicing and hopefully return to this topic later on when I know what a few of these things mean. However, that being said it's a good tutorial talking about Code Sharpner ect just not for beginners like myself at this time.
@יוניארליך-ע5פ4 жыл бұрын
YOU HELPED ME A LOT!!
@MohamedIbrahim-uk7mj7 жыл бұрын
you are the best really
@nitro-ww6sk5 жыл бұрын
High quality tutorials, worth your time!!!
@bahtiyorusmanov72114 жыл бұрын
Easy to understand explanation, thank you!
@rasheedram2006 жыл бұрын
Keep up the good work (Thank you very much for this great tutorial)
@dave-th6yu4 жыл бұрын
You are amazing!!!!! Thank you Mosh!!!!!
@dafiarecord725 жыл бұрын
Hey, thanks a lot, great videos in this channel, i subscribe, everything is clear. voice/presentation/Steps order, i learn more from u, thanks for all.
@khazar57906 жыл бұрын
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?).
@gowthammech19904 жыл бұрын
agree
@olekristianrannekleiv7622 жыл бұрын
the list is basicaly a box you can store things inside. "list" tells the program to make a box you can put things inside, "" describe what you are allowed to put inside this box. In this case only objects created by the class "orders" are allowed to be put inside this box. if he wrote list you could only put strings inside the box. It is abit confusing that he used a custom designed object as an example for what to put inside a list, i agree...
@mylifeinvictus7 жыл бұрын
Dude, thanks so much for your tutorials! They are great!
@fjeanjoseph4 жыл бұрын
Awesome tutorial - Thank you so much!
@anamnasirrollno08384 жыл бұрын
you are amazing!
@bogdanmitroii61593 жыл бұрын
Why not.. In the Costumer Class, as a property.. you don't type this = public List Orders = new Lisy() ; And it will be always initialized without using a Constructor. Why not?
@talk2s5061X3 жыл бұрын
code like a ninja I like this guy!!!
@omarelshayeb34925 жыл бұрын
I laughed when you said you should code like a ninja :'D
@dembasiby4 жыл бұрын
Thank you, Mosh!
@erimun6 жыл бұрын
I like your explanation.Thanks.
@annastaniszewska21724 жыл бұрын
In all his videos about C#, Mosh is basically telling us "If you don't have Resharper, I'm sorry for you" and I'm actually very sorry for me cause of that :< I had it once, now I don't and it's such a loss...
@Nathan-nj6kt Жыл бұрын
Hello Mosh, thank you for your videos, taking time to record these videos are helpful. I however recommend you stop using the same names twice. In the previous video you mentioned "person Person"; this can be very confusing, here again we have "Customer Customer". For the first example you could use "person Student" or something different. This would reduce explanation and learning easier. thank you. thank you.😊
@morty48151623423 жыл бұрын
very helpful, thanks
@יוניארליך-ע5פ4 жыл бұрын
YOU ARE GREAT
@srinivasaraoyp36405 жыл бұрын
Very interesting sir. Thank you..
@Nick-wz6tz4 жыл бұрын
Thank you very much sir !
@Ali7Dali5 жыл бұрын
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!
@mortyjr23345 жыл бұрын
He uses a default constructor to initialize the List, this in itself is bad practice and should be done inline within the field itself, so the field should look like this: List orders = new List(); NOT: List orders;
@rawal166 жыл бұрын
Great Mosh
@YPLabs6 жыл бұрын
Thank you Mosh!
@zuque61996 жыл бұрын
Thank you so very much for the help!
@mikeafter53 жыл бұрын
Thanks!
@darkrist4 жыл бұрын
:D i love the channel, I love the teaching methods!
@christofstanits7 жыл бұрын
amazing tutorial! so very well explained!
@OriginalTubester6 жыл бұрын
Great video, thank you
@princemalongo93032 жыл бұрын
I have over understood. Everything here is clear.
@chrisalbers91844 жыл бұрын
Thank you!
@fahimehramezan35217 ай бұрын
🥰🥰Thank you
@amandabos61665 жыл бұрын
thank you Mosh, you taught me more in 23 min than my teacher at school in 4 hours :-)
@amirprogramming69636 жыл бұрын
thank you :) I suggest you if you could set some exercise , then we can practice it
@everythincomesaround3 жыл бұрын
Great video. I just did't get it with the list of objects. Do you always need to initialize these lists of objects in a constructor?
@rahimeinollahi16 жыл бұрын
Thank you very nice.
@yoanngrudzien25884 жыл бұрын
I'm new at coding and wanna make sure I learn the correct conventions, I have a question : Shouldn't we be using camelCase for fields ? I learned that PascalCase was supposed to be used for properties. ex : public class Human { //camelCase for the field : public int age; //PascalCase for the property: public int Age { get {return age;} set { if (value < 0) { age = 0; } else { age = value; } } } } Thank you in advance to whoever answers me.
@ukaszk44106 жыл бұрын
I have a question. Why after you run it in 13:04 you get "press any key to continue"? For me the breakpoint makes it print only "1" and "John" is not displayed. I added Console.ReadLine() after and removed the breakpoint to get a similar effect, but I like your way much better. Please tell me how to get it this way. And anyway thanks a lot for this video!
@crabsynth34806 жыл бұрын
19:40 - Wow ... beauty ... that made me so happy :) ! : Ouch seconds later u made me realize that its actually ugly. How do you do that ? haha
@aliciavegas52872 жыл бұрын
do you give private lessons ?
@teebear22713 жыл бұрын
Time stamp 19:38
@coronicrefugeestofffic67532 жыл бұрын
i was missing the static void string and was thinking it was cause i didnt have the handy dandy shrtcuts u got
@ivanfenis12215 жыл бұрын
Hi Mosh. Thanks for explaining this topic well :). I just want to ask why "this." isn't needed for the "Orders" when you initialized it in the first Customer constructor? So "this.Orders = "
@thisisbob10015 жыл бұрын
Maybe because it is in the default constructor you don't need thi? docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/instance-constructors
@timeforrice3 жыл бұрын
Can you make a video like this for Interface?
@boblewis12873 жыл бұрын
Not to put an object in an early stage. It's to instantiate and initialize an object.
@TechnicalAkshay6 жыл бұрын
who here after trying sololearn but not understand constructers
@truetrueman6804 жыл бұрын
What is the difference between constructors and classes? I'm a totally new when it comes to programming so sorry if I'm asking a dumb question
@hamedsaidalrawahi40826 жыл бұрын
thank you
@1986hr6 жыл бұрын
Ok this is useful.
@3rdtwirl4942 жыл бұрын
Hello. We would like to know more about building - well one day - forex trading bot . Where do we start
@darthnixilis3044 жыл бұрын
These videos are great, just i wish you wouldnt use a $300/yr extension. The reason people are watching videos on youtube instead of paying for a class is because we're broke. I wish i could spend that kind of money to on an extension.
@1spunch6 жыл бұрын
Clear voice. Talk only good way to do it, I think it will make more clear., not confused
@kensei42374 жыл бұрын
I kinda don’t like the excessive promotion of resharper here, but all in all nice tutorial. Also, it’s not a good practice to use many shortcuts, because at some point you won’t have VisualStudio as an ide and you’ll have to know what to type. Cheers.
@HaloWolf1024 жыл бұрын
What is the difference between var order = new Order() & customer.Orders = new List(); Also, I can't put var order = new Order() in the Customer() class. VS always tells me that I need another instance. So I always instance twice, instead of once.
@nacramri69197 жыл бұрын
perfect...
@johnconnor97876 жыл бұрын
Are your courses on udemy and codewithmosh com the same? If not then what is the difference between them Thank you
@thisisbob10015 жыл бұрын
£50
@junejuly5324 жыл бұрын
After watching this, i realized that I've wasted my parent's monies in school.
@bongemhoangtu24686 жыл бұрын
Hi can I ask something can you help me with the errors in visual studio with connect string : 'A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)' Thanks you
@poloska94714 жыл бұрын
You probably know this by now, but for other people: Make sure that your IP address is whitelisted or the IP permissions constraint is disabled. Make sure that you spelled everything correctly and did not include the "..." in the server URL (include only: " some-server-name.database.windows.net "). Make sure that you specified the correct initial database name. Make sure that you provided all the minimum necessary parameters and the correct order when connecting via a connection string. Make sure that the database server and database are available for remote connections. Good luck!
@boblewis12873 жыл бұрын
To create an object of the class and initialize it
@chelebarry6 жыл бұрын
:'( I had problems understanding this topic hope I understand as I follow along...
@BGraves2 жыл бұрын
Typical for programmers to call it "overloading" just to convolude and confuse with a term that carries a negative connotation.
@kunalsahadeva19405 жыл бұрын
Can you please use white theme for visual studio
@VoidlingGeneral5 жыл бұрын
NEVER dark mode is the future now!
@thisisbob10015 жыл бұрын
@@VoidlingGeneral that's how it was back in the 80s!
@MessingWithCode3 жыл бұрын
HAHAAH yes sensei , yes hahahahahaahahah great video .
@d-abdullah-b21914 жыл бұрын
When you creat the Customer object ,why did you put var instead of Customer?
@sethell24 жыл бұрын
7:43 can someone explain to me the explicit way of writing var customer out? Thanks