Class and Constructor
Class is the way to realize real time entity in oops. It is the user defined data type.
Syntax of Class
Continue...There are two types of constructor and these are following:-
Static Constructor(also known as class constructor)
Continue...If you ask the question that can we call constructor from another constructor then I will say yes we can. Calling constructor from another constructor is known as constructor chaining. This can be done by the keyword this and base. Here we discuss on this keyword and will discuss base keyword in the article constructor with inheritance.
Continue...Inheritance is property of oops by which we access one class into another class without writing the whole code. The class that is inherited is called base class and the class that does the inheritance is called a derived class
Continue...Access specifier defines the accessibility of class member. We can restrict and limit the accessibility of member of classes.
Continue...At the time of overloading we generally use override with virtual. When we need to override the base class method into derived class than we use override keyword.
Continue...Interface in C# is basically a contract in which we declare only signature. The class which implemented this interface will define these signatures. Interface is also a way to achieve runtime polymorphism. We can add method, event, properties and indexers in interface
Continue...Array in C sharp is basically continues memory allocation of given type and size. We create array by using [].
Array Declaration
int[] data = new int[5];
Continue...To search any element in array we use Contains Function. This function is declared and defined in Array class. We have to pass the value in this method. If this value available in the given array then it will return true and if not then it will return false.
Continue...To search any element in array we use Contains Function. This function is declared and defined in Array class. We have to pass the value in this method. If this value available in the given array then it will return true and if not then it will return false.
Continue...Jagged array is simply an array of arrays. As we define 2-d array in which each column for each rows are same. But in case of jagged array we can define different column for each rows.
Continue...Before understanding the operator overloading we need to understand why we use operator overloading. In the following example we have one class calculator which contains two variable x and y. and one web form where we create two variables in its cs file and add them.
Continue...In simple term collection in C# is a way to store objects. We use System.Collection namespace to work with collection.
Continue...