What is an object ?
Object – An object is basically a self-contained entity that accumulates both data and procedures to manipulate the data. Objects are merely instances of classes.
In C# objects are created using the new keyword. Actually new is an operator, creates an object of the specified class and returns a reference to that object. Here is an example :
public class Exercise
{
public void welcome()
{
Console.writeLine("This is Exercise class");
}
}
public class classl
{
static void Main()
{
Exercise exo = new Exercise ();
}