Sunday 13 July 2014

C# .Net OOPS Basics: Classes and Objects.

The terms class and object are sometimes used interchangeably, but in fact, classes describe the type of objects, while objects are usable instances of classes. 

So, the act of creating an object is called instantiation. 

Using the blueprint analogy, a class is a blueprint, and an object is a building made from that blueprint.


Class

class SampleClass
{

}

Object of SampleClass  :

SampleClass objSampleClass= new SampleClass();


For more details: http://msdn.microsoft.com/en-IN/library/dd460654.aspx

No comments:

Post a Comment