Monday 15 June 2015

Introduction to object oriented programing in C#

Class: A class is a blue print of an object that contains members and functions in it.

for ex:

class A
{
int a;
string s;
public void int sum(int a, int b
{
}
}

Object:An object is a instance of a class. You can create object of a class and access all the public variable and methods of that class.

for ex:

A objA=new Obj A();
int sum=a.sum(a,b);

No comments:

Post a Comment