In C# interactive (as part of Visual Studio 2019 or standalone) I'd like to code something like this using C#:
var s = "abcdef";
var s1 = s[2..4];
This gives the following message:
(1,12): error CS0518: Predefined type 'System.Range' is not defined or imported
Is there a way to modify e.g., csi.exe.config or other means in order to support C# 8.0 ?
Update 2020-11-25
It is working in Visual Studio 16.8.2.
Just enter
#reset core
to switch to .NET Core.Update 2020-07-14
According to https://github.com/dotnet/roslyn/pull/45046, it will probably work in the next version of Visual Studio 2019.
Original answer
It looks like there is no way currently. Because C# Interactive is not able to run Core CLR.
https://github.com/dotnet/roslyn/issues/40341