Instance

noun

say it: “IN-stuns” /ˈɪnstəns/

One object made from a class; each one has its own copy of the data.

What is Instance?

An instance is an object made from a class. "Rex is an instance of Dog" means Rex was built from the Dog template. Each instance has its own copy of the data.

var rex = new Dog { Name = "Rex" };   // one instance
var bella = new Dog { Name = "Bella" }; // another instance

In a sentence

  • “Dune and Emma are two instances of the Book class.”

Level: Novice · More OOP terms at this level

Updated

In other subjects