Posted on: 5/24/2011 10:06:44 AM | Views : 970

hi,
i wonder , what is the difference between two creation object?

1- Object creating in constructor.

 public class MyClass
    {
        Person context;
 
        public MyClass()
        {
            context = new Person();
        }
       ////.... other methods.
   }

1- object is creating out of the constructor.

public class MyClass
    {
        Person context = new Person();

        ///....... other methods      
    }
 
generally i think this question w ...

Go to the complete details ...