How to change the C# version in Visual Studio?
Many times we want to know the version of the C# which we are using in the visual studio. Or sometimes we want to change the version of C# to do some testing on a particular version of C#.
The C# version depends upon the .NET Framework that you use. For example:
1. Visual Studio 2019: C# 8.0 (with .NET Core 3.0)
2. Visual Studio 2017: C# 7.X (with .NET 4.7)
3. Visual Studio 2015: C# 6.0 (with .NET 4.6)
4. Visual Studio 2012: C# 5.0 (with .NET 4.5)
5. Visual Studio 2010: C# 4.0 (with .NET 4.0)
6. Visual Studio 2008: C# 3.0 (with .NET 3.5)
7. Visual Studio 2005: C# 2.0 (with .NET 2.0)
8. Visual Studio.NET 2003: C# 1.2 (with .NET 1.1)
9. Visual Studio.NET 2002: C# 1.0 (with .NET 1.0)
For checking or changing the C# version in the visual studio do the following steps:
Step 1: Select the project from Solution Explorer.
Step 2: Right-click on the Project.
Step 3: From the left pane menu select Build.
Step 4: From the right pane click Advanced.
Step 5: Now you can change the C# from the Language version option.
So, this is how you can change your C# version for any project.
You can also check the .net framework version by the following link:
No comments:
Post a Comment
Please do not enter any HTML. JavaScript or spam link in the comment box.