Q34
What is the correct way to define a method named IsEven that takes an integer parameter num and returns true if the number is even, otherwise false, in C#?
A.
IsEven(num) { return num % 2 == 0; }
B.
bool IsEven = (int num) => num % 2 == 0;
C.
bool IsEven(int num) { return num % 2 == 0; }
AnswerD.
bool IsEven { return num % 2 == 0; }
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board