Powershell: Obsolete struct System.Span was introduced

Created on 6 Apr 2018  路  6Comments  路  Source: PowerShell/PowerShell

Most helpful comment

I found description of the feature https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/span-safety.md#metadata-representation-or-ref-like-structs

Having no other good alternatives that work in old compilers without servicing, an Obsolete attribute with a known string will be added to all ref-like structs. Compilers that know how to use ref-like types will ignore this particular form of Obsolete.

All 6 comments

/cc @iSazonov @SteveL-MSFT

That doc seems to be wrong. Span is new and isn鈥檛 marked obsolete in corefx https://github.com/dotnet/corefx/blob/master/src/System.Memory/src/System/Span.Portable.cs. We would have a compilation error if it was obsolete

It is in runtime and System.Memory from last summary.

I found description of the feature https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/span-safety.md#metadata-representation-or-ref-like-structs

Having no other good alternatives that work in old compilers without servicing, an Obsolete attribute with a known string will be added to all ref-like structs. Compilers that know how to use ref-like types will ignore this particular form of Obsolete.

Thanks @iSazonov, that explains it :)

Once I did a second restore this error went away. VS seemed to have some issues...

Was this page helpful?
0 / 5 - 0 ratings