Home / MCQ Bank / Computer
Computer Functions And Methods In C Sharp

What is the correct syntax to define a method named GetMax that takes two integer parameters num1 and num2 and returns the maximum of the two numbers in C#?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • int GetMax(int num1, int num2) { return Math.Max(num1, num2); }

Related Computer Questions

In data modeling, what is the term for the process of filling in missing data values with estimated or imputed values? To print a voucher from Tally we need to press What is the auxiliary space requirement of an exponential sort when used with iterative binary search? What is name mangling in C++? Which of the following functions can be used to find the protocol version of the pickle module currently being used?