An Overview Of Class In OOPS

First of all, class is basically a keyword in Oops and C# or any language which belongs to OOPS. This means class is a keyword in Object oriented based language. So we can say that class is a keyword in oops, and by that keyword we create a new data type which can support multiple or different data types,. i.e., whenever we design the class in C# in that class are multiple variables which maintain the different data types. This means some variable which maintains the integer data type, string data type ..etc. so when we create new data type by the class keyword,that data type can support multiple data types, it could support integer data type and it could support string data type ..etc.

According to real life.

Class ----------------Like as Papa/Your parents/guardians  this means meaning of class is  my parents last_name is Jha (it is a keyword like class in oops/C#), so my name is also Dheeraj kumar jha.

Class <and Class Name>

  1. Class Employee  
  2. {  
  3. //it is a scope of class. that means class area.  
  4. }  

So whenever we are  software developing  first of all we are required to know that programming formatting,
and we know that in every language we are required to use the  Main() method or it is said to be Thread so about Main(). I  explain in a later section.

Main also has a Scope.
  1. Main()  
  2. {  
  3. //it is a scope of Main.  
  4. }  
In C# language:
  1. class Employee   
  2. {  
  3.     int Emp_Id;  
  4.     string Emp_Name;  
  5.     public Static Void Main()   
  6.     {  
  7.         Employee empobj = new Employee();  
  8.     }  
  9. }  
Above the example shows that class is a keyword and by that keyword we create a new data type called Employee which can support multiple data types.
Like employee could be support integer data type, string data type, etc.

So finally how can we access class variable? Create an object of a class and finally access object.(dot).
  1. Employee empobj=new Employee();  
  2. and finally access  
  3. empobj.Emp_Id=12;  
  4. empobj.Emp_Name="Dheeraj Kumar Jha";   
I will briefly explain about class in later sections.