Where do I find the new Span?

后端 未结 2 1404
轮回少年
轮回少年 2020-12-20 11:41

Everyone is writing about how great the new type Span is so I eagerly wanted to start rewriting a couple of methods in my libraries but where do I actu

相关标签:
2条回答
  • 2020-12-20 12:12

    You need to install prerelease version (check "Include prerelease" checkbox in nuget manager) of System.Memory package. Then just use Span (it's in System namespace).

    0 讨论(0)
  • 2020-12-20 12:13

    Visual Studio 2019: If you are using the full .NET Framework (e.g. 4.7.2):

    1. Go to NuGet packagemanager
    2. Search for System.Memory package by Microsoft and install it.

    Now you will be able to use Span<T>.

    No need to search for pre-release versions anymore.

    0 讨论(0)
提交回复
热议问题