C# Enum

Enum is also known as enumeration that consists of a set of named integral constants. In C#, enumerations are value data types. The keyword enum is used to define these data types. The is mainly used to assign the names …

Read moreC# Enum

C# Struct

Struct in C# is a value type and a collection of variables of different data types inside a single unit. It is similar to classes in C# because both are the blueprints to create an object of a class and …

Read moreC# Struct

C# Static Keyword

Static is a keyword in C# that is when used with different to declare static classes and static class members. Static can be field, method, constructor, class, properties, operator, and event. The instance of a class is not required in …

Read moreC# Static Keyword

C# Destructor

A destructor is the opposite of a constructor. A destructor destroys the object of a class as soon as the scope of an object ends. It is also invoked automatically just like a constructor. The destructor cannot have parameters nor …

Read moreC# Destructor

C# Constructor

In C#, a constructor is the member of the class and is automatically invoked once the object of the class is created. It is like a method in a program and is used for the initialization of the data members …

Read moreC# Constructor

C# Object and Class

C# is an object-oriented programming language and classes and objects are the fundamental components of OOP’s. Everything in C# is built upon classes and objects. Let us learn classes and objects with an example. C# Class A class is a user-defined …

Read moreC# Object and Class

C# Array Class

There are various operations that can be done with an array such as creating, manipulating, sorting, searching, etc. This is done by the array class that provides various methods to perform mentioned operation in C#. Note: In C#, Array is …

Read moreC# Array Class

C# Params Array

Sometimes a situation may arise where you do not know how many parameters you want to pass to a method or you may want the method to accept n number of parameters at runtime. In such times params type array …

Read moreC# Params Array