Methods and ToString (C#)
OOPA-levelLesson packSubscription
About this resource
Learn how to add methods to a C# class so objects can do things, and use ToString to control how objects display.
10 slides.
Lesson outline
- Methods — What Objects Can Do
- Adding Methods: Live Demo
- UML — Adding the Methods Section
- The Problem with `Console.WriteLine(rex)`
- Adding `ToString()`: Live Demo
- Python vs C#: `__str__` vs `ToString()`
- Coding Practice: The Counter Class
- Lesson Summary
Unit bundleUnit 1B · Methods and __str__


