Saturday, 24 January 2015

What is Class and why we need it ?

Class is a user defined type.  If we want to store int type of data then there is int predefined type.  But if we want to store a customer information then we have to declare a user defined type by using class keyword.

eg:
Class Customer
{
 Public string CustomerName{get;set;}
 Public string CustomerId {get;set;}
}