Vidyalelo
C# Programming · Q11

Classes and Objects in C Sharp

Programming · C# Programming · question 11

Q11

What is the correct syntax to declare a method named Display inside a class named Person in C#?

A.
Display { public void }
B.
public void Display() { }
Answer
C.
void Person::Display() { }
D.
None of the above

Answer: Option B

Solution

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