Examveda

What is the correct syntax to declare a method named Add that takes two integer parameters and returns their sum in C#?

A. Add(int num1, int num2)

B. int Add(num1, num2)

C. Add(num1, num2)

D. int Add(int num1, int num2)

Answer: Option D


Join The Discussion

Related Questions on Functions and Methods in C Sharp