Answer:
FormatterServices.GetUninitializedObject(Type) is a method through which we can creates a new instance of the specified object type without invoking constructor. Even if the constructor is declared as private we can able to create object outside of the class. Because the new instance of the object is initialized to zero and no constructors are run.
Note: You cannot use the GetUninitializedObject method to create instances of types that derive from the ContextBoundObject class.
Asked In: Some Interviews |
Alert Moderator