"kalaivanan" <ma********@gmail.coma écrit dans le message de news:
11********************@m58g2000cwm.googlegroups.co m...
| i have theoretical knowledge about object, reference and instance.
| but i want to know clearly about what is an object, reference and
| instance.
| can any one help me?
| or is there any article which can explain it.
This is a class
public class Person
{
///
}
It is a description of a Person, a sort of template from which Person
objects or instances can be created. Think of a Class as a cookie cutter and
the objects or instances it creates as the cookies.
Object and Instance are interchangeable terms for the things that a Class
creates.
{
Person p = new Person();
...
}
p is a reference or variable that holds an object or instance.
public class Person
{
private string name;
...
}
In this example, name is a string Field, which is a variable held inside an
instance of the Person class.
There's more, but does that help ?
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer