Keep it Simple

// practice, the distance between dream and achievement

Tag: Overloading

Object Oriented Programming – Constructor?

In object-oriented programming, a constructor in a class is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.

Continue reading

Object Oriented Programming – override vs new?

The purpose of writing this article is simple; to provide a simple and fresh demonstration of override vs new keyword in C#.

This is all to do with polymorphism. When a virtual method is called on a reference, the actual type of the object that the reference refers to is used to decide which method implementation to use. When a method of a base class is overridden in a derived class, the version in the derived class is used.

Continue reading

Object Oriented Programming – Overloading

Overloading is what happens when you have two methods with the same name but different signatures. At compile time, the compiler works out which one it’s going to call, based on the compile time types of the arguments and the target of the method call.


Continue reading

© 2017 Keep it Simple

Theme by Anders NorenUp ↑