Skip to content

C# Feature - Params collections

Params collections extend params so APIs can accept more collection forms while keeping a natural call-site syntax.

C# 13.0 (2024)

public static void Log(params string[] items) { }
public static void Log(params ReadOnlySpan<string> items) { }
Log("info", "payments", "approved");
  • Use params collections for API design when spans or custom collection builders are a better fit than arrays.
  • Keep overloads unambiguous when mixing params and non-params signatures.
  • C# 13 broadened params support beyond arrays.