Learn how to override the ToString method on a C# object.
- [Instructor] In the last video,…we did some work in the Program.cs file,…which is part of the CharacterCommand project.…And all we really did here was to instantiate a character,…and then generate it.…When we ran this, we didn't really see anything,…and that's sort of unsatisfying…as you're developing a project.…It's really nice if you can see if everything is working…and see how things are coming along,…so why don't we go ahead and add some functionality…that will do that for us?…I mentioned in the last video that once you get things…fairly well squared away in the Program.cs file,…you're going to do most of your editing in the library.…
So with that in mind, let's switch…back over to Character.cs.…If you don't happen to have it open,…it should be over here in your Solution Explorer.…What we're going to do for this particular exercise…is we're going to generate a string version…of the Character class.…Every class in C# inherits from a base object.…The base object is where you get those extra properties…and methods that you didn't put into your program yourself,…
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
New Features Xamarin and Visual Studio 2017with Kevin Ford1h 44m Intermediate
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.