Vidyalelo
C# Programming · Q29

Introduction to C Sharp

Programming · C# Programming · question 29

Q29

What is the correct syntax to define a method in C#?

A.
methodName() { /* method body */ }
B.
methodName { /* method body */ }
C.
void methodName { /* method body */ }
D.
void methodName() { /* method body */ }
Answer

Answer: Option D

Solution

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