Learn how to declare a variable using both declarative and implicit typing.
- In the last video we saw how to create what we called…an auto property, but we didn't really explain…what it is or why you'd want to use it.…I generally like to teach it this way.…I want to show you how to make a traditional property…with a getter and setter on it…and then I think this one will make a little…bit more sense.…So the first thing I usually like to do…is make something from the Java perspective.…What you would do in Java is you would generally…create a private variable in this case it's going…to be an integer.…And you give it a name.…
In this case I'll use underscore Strength.…Underscore is just a convention you'll see used in…C sharp where you're telling everyone that's reading…your program that you're dealing with a private variable.…You don't have to call it underscore something.…And the underscore itself doesn't have any magical powers.…It's just a convention that I use.…I'll go ahead and close off this statement.…Now since it's private, nothing except this particular…class, character CS has access to underscore strength.…
Author
Released
1/17/2019- 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
Duration
Views
Related Courses
-
Docker for .NET Developers with Visual Studio
with Lee Brandt46m 52s Intermediate
-
Introduction
-
Course overview2m 54s
-
Using the exercise files1m 50s
-
1. C# on the Mac?
-
C# for Mac development?3m 15s
-
Overview of the C# language3m 35s
-
-
2. Getting Started with C#
-
Understanding C# syntax2m 20s
-
Variables and types in C#16m 58s
-
Project rules6m 18s
-
Creating a class5m 1s
-
Auto-properties2m 15s
-
Encapsulation8m 15s
-
Constructors6m 54s
-
Random number method8m 1s
-
Generating the character3m 59s
-
-
3. Deeper into C#
-
Using the library7m 23s
-
Overriding ToString10m 22s
-
Using for loops4m 55s
-
Simple arrays7m 17s
-
Working with lists: Part 15m 23s
-
Working with lists: Part 27m 25s
-
Updating the ToString method3m 52s
-
Flow control9m 46s
-
Building and testing the app6m 13s
-
4. Creating a Mac App
-
Setting up the GUI project3m 46s
-
Customizing the controls3m 8s
-
Attribute inspector3m 48s
-
Creating Actions2m 20s
-
The view controller8m 34s
-
Adding a new text field2m 54s
-
Multiline text field2m 58s
-
Working with table views5m 53s
-
Table view outlets2m 28s
-
Finish the view controller3m 55s
-
-
Conclusion
-
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.
CancelTake 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.
Share this video
Embed this video
Video: Encapsulation