C
C#2y ago
AtOm

❔ 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
AtOm
AtOmOP2y ago
this project is using old language i guess
Thinker
Thinker2y ago
Are you using Framework?
AtOm
AtOmOP2y ago
yes Wpf
Denis
Denis2y ago
If you have created a .NET Framework WPF application, then you cannot get anything newer than 7.3
ero
ero2y ago
Untrue
Denis
Denis2y ago
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
ero
ero2y ago
they're not even in the server anymore
Denis
Denis2y ago
Huh?
ero
ero2y ago
is anything confusing about what i said
Denis
Denis2y ago
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?
ero
ero2y ago
<LangVersion>9.0</LangVersion> in the csproj or latest or preview https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-options/language#langversion
Denis
Denis2y ago
Very cool, thanks!
Klarth
Klarth2y ago
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.
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server