Q15
What is the correct way to define a method named GetSquare that takes an integer parameter num and returns its square in C#?
A.
GetSquare(num)
B.
int GetSquare = (int num) { return num * num; }
C.
int GetSquare(int num)
AnswerD.
int GetSquare(num) { return num * num; }
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board