You must Sign In to post a response.
  • Category: .NET

    What is the difference between Object and instance.

    what is difference between Object and Instance in .NET. I search through some sites but I didn't get good understandable answers. Can u please clear my doubt.
  • #763270

    Hello Gorakh Jadhav,

    Object :
    An instance is an object in memory. Basically you create object and instantiate them when you are using them.

    Suppose you have 5 fruits in your basket. Each of those fruits is an object of type Fruit, which has some characteristics (i.e. big, round, grows on trees).

    Objects has characteristics like state and behavior. Suppose Human have state (name, age) and behavior (running, sleeping)

    Instance :
    An instance is a unique copy of a Class that representing an Object.

    Difference about both in simple words we can say "Instance refers to the copy of the object at a particular time whereas object refers to the memory address of the class"

    Hope this will help you to understand about an object and instance.

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #763278
    Good explanation Nirav...
    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #763280

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #763283
    Object is instance of class, and instance is the bridge between object and a class, simply we can say instance is copy of object that refer class
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • Sign In to post your comments