I a new at OO programming and trying to clear up a few things.
When you instatiate a class and create an object, Ive seen the following:
class Program
{
static void Main(string[] args)
{
MyClassA a = new MyClassA();
MyClassA b = a;
MyClassA c = b;
c.DoSomething();
Console.ReadLine();
}
}
public class MyClassA
{
public void DoSomething()
{
Console.WriteLine("I am from Class A");
}
}
This may be a bad example, but the question I am trying to get answered is: Why is pointing one object reference to another important or why\where is it used? Why not use the object you created in the first place?