Intermediate C#
Q100 / 100

What is the purpose of the params keyword in C#?

Correct! Well done.

Incorrect.

The correct answer is B) Allows a method to accept a variable number of arguments of the same type without requiring an array literal

B

Correct Answer

Allows a method to accept a variable number of arguments of the same type without requiring an array literal

Explanation

void Log(string msg, params object[] args) can be called as Log("x", 1, "y", 2). Internally the args are an array.

Progress
100/100