ru24.pro
News in English
Май
2024

C# 13 enhances params, introduces extension types

0

C# 13, a planned update to Microsoft’s popular general purpose language for .NET development, is set to enhance params parameters to give developers more flexibility, and to introduce extension types, a new kind of type that provides extension members for an underlying type.

Microsoft detailed the plans for C# 13 on May 21.

Beginning with C# 13, the params parameter type can be any of the types used with collection expressions such as Span<T>, List<T>, and IEnumerable<T>. Developers also can use their own collections if they follow special rules. Also, many methods of the .NET Runtime are being updated to accept params Span<T>, to reduce memory allocations and enable applications to run faster. This is part of an ongoing effort to make C# faster and more reliable. It also is an example of attention given to ensuring various C# features work well together, Microsoft said.

To read this article in full, please click here