Posted by: Pdfprep
Post Date: November 10, 2020
You have the following line of code.
Type type1 = typeof^MyClass);
You need to create an object named obj that has a type of type1.
Which line of code should you use?
A . object obj = Activator .Createlnstance( "type 1" .GetType()) ;
B . type1 obj = Activator.Createlnstance(typel);
C . type1 obj = Activator.Createlnstance( "type1" .GetType());
D . object obj = Activator.Createlnstance(typ1);
Answer: D
Leave a Reply