What is a class in OOPS?

A Class is the blueprint of its objects. Inside the class the programmer can describe the properties and functions required for the behavior of the class. System.Object is the base class of .Net Library.

Syntax of a Class:

public class Human
{
    Public string Name{get;set;}
    Public int Height{get;set;}
    Public string Look{get;set;}

    Public void Run()
    {
        //Do running action
    }
    Public void Talk()
    {
       //Do talking action
    }
}

Class is the type of object

 

Leave a Reply

%d bloggers like this: