Информация об изменениях

Сообщение Re: .NET Core 2.1 Roadmap от 06.02.2018 8:44

Изменено 06.02.2018 9:13 vorona

Re: .NET Core 2.1 Roadmap
Здравствуйте, BlackEric, Вы писали:

BE>Появился .NET Core 2.1 Roadmap


Span[T]

spans support the notion of reinterpret casts, meaning you can cast a Span<byte> to be a Span<int> (where the 0th index into the Span<int> maps to the first four bytes of the Span<byte>). That way if you read a buffer of bytes, you can pass it off to methods that operate on grouped bytes as ints safely and efficiently

Re: .NET Core 2.1 Roadmap
Здравствуйте, BlackEric, Вы писали:

BE>Появился .NET Core 2.1 Roadmap


Span[T]

spans support the notion of reinterpret casts, meaning you can cast a Span<byte> to be a Span<int> (where the 0th index into the Span<int> maps to the first four bytes of the Span<byte>). That way if you read a buffer of bytes, you can pass it off to methods that operate on grouped bytes as ints safely and efficiently

In support of Span<T> and friends, hundreds of new members and types are being added across .NET. Many of these are overloads of existing array-based and string-based methods, while others are entirely new types focused on specific areas of processing. For example, all the primitive types like Int32 now have Parse overloads that accept a ReadOnlySpan<char> in addition to the existing overloads that take strings.