What does the 'params' keyword do in C# method parameters?
A. Restricts the number of arguments
B. Declares constant parameters
C. Indicates static method
D. Allows variable number of arguments
Answer: Option D
A. Restricts the number of arguments
B. Declares constant parameters
C. Indicates static method
D. Allows variable number of arguments
Answer: Option D
What is the correct syntax to declare a variable in C#?
A. num = int;
B. var num;
C. num int;
D. int num;
What is the purpose of the 'var' keyword in C#?
A. Declares a constant
B. Converts a variable to string
C. Implicitly declares a variable
D. Defines a method
Join The Discussion