Lesson 13: Interfaces

This lesson teaches C# Interfaces. Our objectives are as follows: Understand the Purpose of Interfaces. Define an Interface. Use an Interface. Implement Interface Inheritance. An interface looks like a class, but has no implementation. The only thing it contains are declarations of events, indexers, methods and/orproperties. The reason interfaces only provide declarations is because they … Continue reading “Lesson 13: Interfaces”

Lesson 10: Properties

This lesson teaches C# Properties. Our objectives are as follows: Understand What Properties Are For. Implement a Property. Create a Read-Only Property. Create a Write-Only Property. Create an auto-implemented property. Overview of Properties Properties provide the opportunity to protect a field in a class by reading and writing to it through the property. In other … Continue reading “Lesson 10: Properties”

Lesson 9: Polymorphism

This lesson teaches about Polymorphism in C#. Our objectives are as follows: Learn What Polymorphism Is. Implement a Virtual Method. Override a Virtual Method. Use Polymorphism in a Program. Another primary concept of object-oriented programming is Polymorphism. It allows you to invoke derived class methods through a base class reference during run-time. This is handy … Continue reading “Lesson 9: Polymorphism”