Repository navigation
Description
Reproduce:
- click Run button on first code block
- copy code from last code block to editor
- click Run on editor
Error:
(6,5): error CS0246: The type or namespace name 'Range' could not be found (are you missing a using directive or an assembly reference?)
(6,15): error CS0518: Predefined type 'System.Index' is not defined or imported
(6,15): error CS8652: The feature 'range operator' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.
(6,15): error CS0518: Predefined type 'System.Range' is not defined or imported
(6,22): error CS0518: Predefined type 'System.Index' is not defined or imported
(13,5): error CS0246: The type or namespace name 'Range' could not be found (are you missing a using directive or an assembly reference?)
(13,15): error CS8652: The feature 'index operator' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.
(13,15): error CS0518: Predefined type 'System.Index' is not defined or imported
(13,15): error CS0656: Missing compiler required member 'System.Index..ctor'
(13,15): error CS0518: Predefined type 'System.Index' is not defined or imported
(13,15): error CS8652: The feature 'range operator' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.
(13,15): error CS0518: Predefined type 'System.Range' is not defined or imported
(13,30): error CS8652: The feature 'index operator' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.
(13,30): error CS0518: Predefined type 'System.Index' is not defined or imported
(13,30): error CS0656: Missing compiler required member 'System.Index..ctor'
(13,30): error CS0518: Predefined type 'System.Index' is not defined or imported
(18,69): error CS0246: The type or namespace name 'Range' could not be found (are you missing a using directive or an assembly reference?)
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: a92f2fd3-888f-340e-72dd-8a3338313783
- Version Independent ID: 67981ff3-5016-3147-b3c2-5bc16efe1416
- Content: Explore ranges of data using indices and ranges
- Content Source: docs/csharp/tutorials/ranges-indexes.md
- Product: dotnet-csharp
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn
Activity
mairaw commentedon Sep 29, 2019
Thanks for your feedback @xantilon. We should just remove the interactive from the first sample. It doesn't work with this tutorial.
pkulikov commentedon Sep 30, 2019
@BillWagner @mairaw are there any plans to update the try.net engine to .NET Core 3.0 and C# 8? Then a lot of new snippets can be made interactive.
mairaw commentedon Sep 30, 2019
@LadyNaggaga can you comment on that?
BillWagner commentedon Sep 30, 2019
Side note: This is one of the reasons the C# 8 exploration is in dotnet/try-samples. That uses server side blazor, which makes it easier to have the latest CLR and libraries.