6
I wanted to know how to find out the version of C# I’m using.
6
I wanted to know how to find out the version of C# I’m using.
8
It is possible to verify the version through code as well:
string version = typeof(string).Assembly.ImageRuntimeVersion;
However, from what I was analyzing, the version informed by
ImageRuntimeVersion
is not the correct version of C#.
The C# version depends on which . NET Framework you are using.
C# Language Team created a history of C# versions and their features in the repository github
theirs:
Information collected from:
4
Gee! There’s no csproj in Webforms :\
But there’s a project file
Wouldn’t right-click the project, Properties and application tab to check the target framework?
The version of "Target Framework" is like ". Net Framework 4.5". But it has some relation with the version of C#? (I was in doubt now)
@Wallacemaxters You don’t have
By selecting a project from your solution and following the steps @LINQ went through, you can check the C# version yes, I just took the test.
@Leandroangelo No. There is no direct relationship between the language version and the framework.
4
As far as I know there is no information at runtime, can only get from the framework.
Compiler says his version calls itself in command line. But it doesn’t say which version of the language, because it can compile with a different version profile. You can at least know until which version it compiles.
Try this on the project:
If none of this works out, and it has to, try using a feature that you only have in a certain version, if it works you know that at least that version is ok. If you make a mistake, you know you have a lower version, then you go for a trial and error up or down :) I know it’s Ambi, but it’s the way if nothing else goes right.
https://www.codeproject.com/Tips/865579/How-to-change-targeted-Csharp-version-in-Visual-St
Browser other questions tagged c#
You are not signed in. Login or sign up in order to post.
Control panel => programs and resources :D
– user28595
@Articuno this is serious?
– Wallace Maxters
This is the. net framework version. No???
– DiegoSantos
@Wallacemaxters one thing that has not become clear is whether you want to know if it is Vs, while running, or otherwise
– Maniero