Sometimes, we are in a position to change the C# language version because we may work in an already developed project or the client (Technical Client) may ask us to develop an updated version. We do not exactly remember how many features we have used only available in C# 6 but not in any other lower version so, that it is better to change the C# Language Version based on the Developement Application or Developed Application,
Okay, let's move to the step to change language version.
Step 1
Select the project from the Solution Explorer window for which we want to change the C# Language version. Right click on the respective project.
Step 2
Click on "Bulid" tab once you get the below screen and next, click the "Advanced" button.
Step 3
Once you click on the Advanced button, you will see the below screen.
Here, select the required version and then click OK.
Note
- If you are working on the lower version and now you trying to change the language version to higher, means no issue.
- If you want to change the language version from higher to lower means you will get the error when you have used the higher version features.
Step 4
Now, click "Save" to optimize this language version to your current application.
That’s it. Now, the language version has been changed and if there is any written code which is not supported in changed version, it will give error during project build.
I hope it will help you.