C# Events

An event is a mechanism for communication between objects. When something happens such as a key press or an error, an event can notify other objects about it. C# Events are used for inter-process communication. Events are known as the user actions such as mouse movements, keypress, and clicks, etc. In C# applications have to … Read more

Categories C#

C# Type Conversion

C# Type Conversion is a mechanism to convert one data type value to another one. Type conversion is possible if both the data types are compatible to each other; otherwise you will get an InvalidCastException. It is also called Type Casting. In C# Type Conversion is consist of 2 major forms: Explicit type conversion Implicit … Read more

Categories C#

C# Tuple

A tuple is a data structure in the C# language. A tuple is known as the data structure that contains a sequence of elements having different data types. Syntax: Characteristics of Tuples: C# Tuple can store duplicate elements. Tuple allows to create, access and manipulate data set. Tuple also allows to represent multiple data into … Read more

C# Operator Overloading

Operator Overloading is defined as a process of defining and implementing the polymorphism technique. Operator Overloading in C# is consists of operators which are functions with special names the keyword operator followed by the symbol for the operator being defined. Syntax: Given below is the syntax of operator overloading implementation, Overloading can be done on both Unary … Read more

C# Indexers

Indexers in C# allow an object to be indexed like an Array. When you define an indexer for a class, this class behaves similar to a virtual array. You can then access the instance of this class using the array access operator ([ ]). In C#, Indexers are known as the special kind of attribute which allows … Read more

C# Properties

Properties in C# are known as the members of a class that can be used to set and get the data from a data field of a class. Properties are not particularly used to store data in C#, they are just like an interface to transfer the data. Properties are defined as the named members … Read more

C# Generics

Generics in C# allows defining the specification of the data type of programming elements in a class or a method until it is actually used in the program. Specification for the class or method can be written with substitute parameters for the data type. Following are some important features of Generic: Generics in C# helps to … Read more

C# Reflection

Reflection objects in C# are mainly used to obtain type information at runtime in the system. These classes which allow access to metadata of any running program are meant to be in the System.Reflection namespaces. We can also say that Reflection is capable to get the type of information that describes different modules, parameters, and … Read more

C# Delegates

C# Delegates are the reference type variables that hold the reference to a method. Delegates are similar to pointers to functions, in C or C++. The reference given to delegates can be changed at runtime. All delegates are implicitly derived from the System.Delegate class. They are used for implementing events and call-back methods. Declaring Delegates in C# … Read more

C# Unsafe Code

Unsafe code in C# can also be defined as Unverifiable code. These unsafe codes can be run outside the control of the Common Language Runtime (CLR) of the .NET frameworks. The “unsafe” keyword is used to tell the compiler that the control of this particular code will be done by the programmer. In an unsafe context, code uses pointers, … Read more