C# Tutorial for Beginners #22 - Constructors

Channel:
Subscribers:
8,960
Published on ● Video Link: https://www.youtube.com/watch?v=AnbSVAixYPI



Category:
Tutorial
Duration: 5:48
438 views
16


Creation and usage of class constructors, as well as how to use the readonly keyword, and a few tips and tricks.

Another quick tip --
If you select inside your class' code block and press CTRL and the period key (.), you can select "Generate constructor" and select fields to be included in your automatic constructor generation.
Thanks @frightone for suggesting including this helpful tip!

At 3:21 I meant overloaded not overridden! :)

Please let me know if you have any questions. Happy coding!

Chapters:
0:00 Introduction
0:22 What is a Constructor?
1:21 Creating a Constructor
2:40 Implementing the new Constructor
3:20 Overloading Constructors
4:00 readonly Keyword
5:05 ctor Shortcut
5:26 Wrap up