I have the below snippet of code to test/use dotnet 2.1 in vs 2017 in order to try out and run C# 7.2s Span functionality. Where can I find the SDK that allows me to run this within Visual Studio. I can only find frameworks up to 2.0.
using System;
using System.Memory;
namespace sim
{
class Program
{
static void Main(string[] args)
{
var arr = new byte[10];
Span<byte> bytes = arr; // Implicit cast from T[] to Span<T>
Span<byte> slicedBytes = bytes.Slice(start: 5, length: 2);
}
}
}
Otherwise I'm left unable to run and use Error CS0305 Using the generic type 'Memory' requires 1 type arguments sim