-
Notifications
You must be signed in to change notification settings - Fork 563
Description
Describe the bug
The following error messages are encountered when I copied and pasted the first code snippet provided in the "Explore C# 6 - C# interactive C# tutorial"
(1,1): error CS8652: The feature 'using declarations' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.
(1,7): error CS0118: 'System' is a namespace but is used like a type
(1,13): error CS0210: You must provide an initializer in a fixed or using statement declaration
(1,13): error CS1001: Identifier expected
(1,1): error CS1513: } expected
(27,14): error CS0542: 'Program': member names cannot be the same as their enclosing type
Did this error occur while using dotnet try or online?
- [ x ]
dotnet-try - [ x ] online
What kind of error was it?
- [ x ] User Interface (UI): For example the output never displayed
- Service Error: For example "The service is temporarily unavailable. We are working on it"
- [ x ] Other:
(1,1): error CS8652: The feature 'using declarations' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.
(1,7): error CS0118: 'System' is a namespace but is used like a type
(1,13): error CS0210: You must provide an initializer in a fixed or using statement declaration
(1,13): error CS1001: Identifier expected
(1,1): error CS1513: } expected
(27,14): error CS0542: 'Program': member names cannot be the same as their enclosing type
Screenshots
Steps to reproduce:
- Navigate to https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/exploration/csharp-6?tutorial-step=1
- Click Focus Mode
- Copy the first code snippet provided in the web page.
- Paste the code in the .NET editor
Actual Result:
(1,1): error CS8652: The feature 'using declarations' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.
(1,7): error CS0118: 'System' is a namespace but is used like a type
(1,13): error CS0210: You must provide an initializer in a fixed or using statement declaration
(1,13): error CS1001: Identifier expected
(1,1): error CS1513: } expected
(27,14): error CS0542: 'Program': member names cannot be the same as their enclosing type
Please complete the following:
- OS
- [ x ] Windows 10
- macOS
- Linux (Please specify distro)
- iOS
- Android
- Browser
- [ x ] Chrome
- [ x ] Edge
- Safari