Hey guys, just starting out with C#. I had a few doubts, would really appreciate it if anyone could help me out here
Question #1
animal dog;
dog = new animal();
what's the difference between the above two lines ?
Question #2
namespace proj1
{
public class form1:form
{
guy bob;
public form1()
{
initialize component();
bob = new guy();
bob.name = "bob";
}
}
When the Form1 class is instantiated, the Constructor form1() is the first thing to run.
But how can bob = new guy() be executed before Guy bob which is in the data member declaration of the class ??