Currently browsing tag > C#

Polymorphism in C#

Through inheritance, a class can be used as more than one type; it can be used as its own type, any base types, or any interface type if it implements interfaces. This is called polymorphism. In C#, every type is polymorphic. Types can be used as their own type or …

C# Events

An event is a way for a class to provide notifications when something of interest happens. For example, a class that encapsulates a user interface control might define an event to occur when the user clicks on the control. The control class does not care what happens when the button …

C# Constructors

Whenever a class or struct is created, its constructor is called. A class or struct may have multiple constructors that take different …

C# Interfaces

An interface contains only the signatures of methods, delegates or events. The implementation of the methods is done in the class that …

Indexers in C#

Indexers permit instances of a class or struct to be indexed in the same way as arrays. Indexers are similar to properties …

Generics in .Net Framework

Generics let you tailor a method, class, structure, or interface to the precise data type it acts upon. For example, instead of …