Examveda

What is the correct syntax to create a new instance of a class in C#?

A. new obj = MyClass();

B. MyClass obj = new MyClass();

C. MyClass obj();

D. None of the above

Answer: Option B


This Question Belongs to C Sharp Programming >> Introduction To C Sharp

Join The Discussion

Related Questions on Introduction to C Sharp