Lesson 20: Introduction to Generic Collections

All the way back in Lesson 02, you learned about arrays and how they allow you to add and retrieve a collection of objects. Arrays are good for many tasks, but C# v2.0 introduced a new feature called generics. Among many benefits, one huge benefit is that generics allow us to create collections that allow … Continue reading “Lesson 20: Introduction to Generic Collections”

Lesson 19: Encapsulation

Earlier in this tutorial, you learned about two of the important principles of object-oriented programming, Inheritance and Polymorphism. Now that you’ve seen much of the syntax of C#, I’ll show you how C# supports the another of the object-oriented principles – Encapsulation. This lesson will discuss Encapsulation with the following objectives: Understand the object-oriented principle … Continue reading “Lesson 19: Encapsulation”

Lesson 18: Overloading Operators

This lesson shows you how to overload C# operators. Our objectives are as follows: Understand what operator overloading is Determine when it is appropriate to overload an operator Learn how to overload an operator Familiarize yourself with rules for operator overloading About Operator Overloading In Lesson 2, you learned what operators were available in C#, … Continue reading “Lesson 18: Overloading Operators”

Lesson 16: Using Attributes

This lesson explains how to use C# attributes. Our objectives are as follows: Understand what attributes are and why they’re used Apply various attributes with multiple or no parameters Use assembly, type member, and type level attributes Why Attributes? Attributes are elements that allow you to add declarative information to your programs. This declarative information … Continue reading “Lesson 16: Using Attributes”