An example of using C# 13 params with a ReadOnlySpan.
| | |

C# 13: Use params collections with any recognized collection type

The params modifier in C# has traditionally been associated with array types, allowing methods to accept a variable number of arguments. However, starting with C# 13, you can now use params collections with a variety of collection types, broadening its applicability and making your code even more versatile. Supported collection types The params modifier now…

| | |

How to switch to C# 13

While trying out C# 13 features, it’s possible you might come across errors similar to these: Feature is not available in C# 12.0. Please use language version 13.0 or later. or Error CS8652: The feature ‘<feature name>’ is currently in Preview and unsupported. To use Preview features, use the ‘preview’ language version. There are two…