How to create class in c#.net?
Class having the structure like c++ and java in c#.net and microsoft adding some functionality for class. the structure of class is below.
class class_name
{
//here we can declare members.
public | private | protected | protected internal member_name;
class_name()// this called constructor.
{
//here we can assign values for members.
member_name=values;
}
//here we can declare member function.
public | private | protected | protected internal function_name(arguments)
{
//here we can write the functionality of this function.
}
}
the above examples having public | private | protected | protected internal these are called access modifiers.
constraints of class
1. Constructor name and class name should be same.
2. Constructor should not have a return type.
3.By default protection level is private for constructor.
4.Class name should starts with alphabets.





