Tag Archives: virtual

Cast arrays from one reference type to another in C#

Every C# programmer knows that you can use a cast operator to convert one data type into another. For example, if the Employee class inherits from the Person class, then the following code creates an Employee object and then makes … Continue reading

Posted in arrays, syntax, variables | Tagged , , , , , , , , , , , , , | Leave a comment

Override a parent class method in C#

One of the coolest features of object-oriented programming is virtual methods. If a parent class declares a method as virtual, a child class can provide a new implementation for the method. When the program calls the method for a child … Continue reading

Posted in classes, OOP | Tagged , , , , , , , , , , , , | 1 Comment