❔ how can I change this code to higher language in WPF C#
i'm new and i don't know how to change this i tried alot of ways but it still get me errors
14 Replies
this project is using old language
i guess
Are you using Framework?
yes
Wpf
If you have created a .NET Framework WPF application, then you cannot get anything newer than 7.3
Untrue
I suggest creating a .NET WPF application. In Visual Studio z when you choose to create a new project, youll see in round braces .NET Framework - you don't want this, if you wish to use the latest and greatest. Choose the WPF template without the framework in the name
they're not even in the server anymore
Huh?
is anything confusing about what i said
Ok now I understand this
But can you elaborate on this? Is there an official documentation from MS stating support for newer language features on framework?
<LangVersion>9.0</LangVersion>
in the csproj
or latest
or preview
https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-options/language#langversionVery cool, thanks!
It's not officially supported, although a lot of it will work. https://sergiopedri.medium.com/enabling-and-using-c-9-features-on-older-and-unsupported-runtimes-ce384d8debb will go through the rationale and https://github.com/Sergio0694/PolySharp will help you fill in certain features. Features that require runtime support will not work regardless.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.