← Back

C# 13 introduces params collections!

2026-01-02 16:11

Until now, params was limited to arrays:

void Print(params string[] values) { foreach (var v in values) Console.WriteLine(v); }

Print("A", "B", "C");

Now in C# 13, you can use params with other collection types like List<T> or even Span<T>:

void Print(params List<string> values) { foreach (var v in values) Console.WriteLine(v); }

Print("A", "B", "C");

✨ This makes APIs more expressive and eliminates unnecessary array conversions.

👉 Where would you use params collections in your projects?

#csharp #dotnet #developerexperience #cleanCode

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.