params Parameter
A final array parameter that accepts a variable number of arguments.
What is params Parameter in C#?
params Parameter — A final array parameter that accepts a variable number of arguments.
class ScoreTotal
{
int Add(params int[] scores)
{
return scores.Sum();
}
}
Level: Apprentice · More C# terms at this level
Updated