Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
C#

Params Keyword in C#

Accept variable argument lists with params arrays.

Params Keyword in C# — a practical guide to C# params keyword with clear examples you can reuse in real projects.

C# Tutorial Series (43/121). Prefer one article? Read the complete C# tutorial.

Short description

params must be the last parameter.

params

int Sum(params int[] values) => values.Sum();
var total = Sum(1, 2, 3, 4);

Leave a reply

Your email address will not be published. Required fields are marked *