Vidyalelo
C# Programming · Q14

Introduction to C Sharp

Programming · C# Programming · question 14

Q14

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

A.
new obj = MyClass();
B.
MyClass obj = new MyClass();
Answer
C.
MyClass obj();
D.
None of the above

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board