Abstract Classes
Abstract classes are classes that always serves as base class for other classes. Abstract classes are slightly similar to interfaces but abstract classes can also have methods and properties that already…
C# Interface
C# Interfaces are similar to classes, but it only contains declarations for methods and properties. Interfaces can be considered as plugins to classes. The class that implements a particular interface is…
is Operator
The is operator in C# allows you to test if an object can be converted into another object mainly by using casting. The is operator requires two operands, the one that will be tested,…
Operator Overloading
Operator overloading allows you to customize the behaviors of C# operators depending on the type of its operands. Operator overloading allows a C# operator to interpret objects in a different way.…
Containment
Containment or composition is the process of adding another class as a member of a class. For example, a Person class can have a field of type Name. The program below shows an example…
Boxing and Unboxing
Boxing is the process of converting a value type such as a structure into an object or a reference ;Unboxing is the opposite the opposite process and converts reference types to value…
System.Object Class
All classes in the .NET Framework inherits from the ;class. The ;class is mapped to the object keyword in C#. For simplicity, I will just use object to refer to The following is a list of…
Virtual Methods
Virtual methods are methods of a base class that can be overridden by a method in a derived class to provide a different implementation of that method. For example, you have…
Static Members
The static keyword is used on members and properties that want to be shared by all instance of the class. When a method or property is defined as static, you can call them…
protected Access Specifier
The protected access specifier allows class members to be accessed only by those who inherits from them. We learned about the public and private access specifiers. The protected access specifier is used when only the derived classes and…