Learn how to articulate what namespaces are used for in C# and code organization.
- [Narrator] We've got most of our basic properties…in here and presumably working.…We're not actually going to see this run…until a little bit later.…But there is one more thing I want to show you…inside of this class.…And for this, we need to scroll all the way up to the top.…What I wanted to show you here at the top,…is the constructor for the class.…We got this automatically when we generated the class.…You'll note that it is a method,…because it has open and close parentheses on it,…and it's public, because they pretty much have to be.…
And then the other thing about a constructor is that,…first of all it has to match the name of the class.…Those two things have to match.…And there is no return type,…because it's impossible to return something…from a constructor.…So it's a special kind of method,…why do we need it?…Constructors get run automatically when we…instantiate a new variable.…So, it's a great place to add code…to set up your new object as it's instantiated.…For example, I generally like to come in…
AuthorBruce Van Horn
- Exploring C# on a Mac
- Creating a reusable code library
- Classes and properties
- Loops, arrays, and lists
- Creating a console app
- Creating a command-line app
- Creating a Mac desktop app
- Creating a UI with view controllers and actions
Skill Level Beginner
Docker for .NET Developers with Visual Studiowith Lee Brandt46m 52s Intermediate
1. C# on the Mac?
2. Getting Started with C#
3. Deeper into C#
4. Creating a Mac App
Next steps3m 14s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.