Re:Welcome to C# 10
by metaltyphoon on Monday November 08, 2021 @03:14PM
(#29153682)
I agree in a sense but I would do it another way. Either change to the Rust edition equivalent, or simply drop old stuff and keep in the newer bits.
[ Parent
| on HN ]
Re:Welcome to C# 10
by colejohnson66 on Monday November 08, 2021 @06:49PM
(#29155882)
There is a Rust edition equivalent in C#…kindof. The csproj file has a property to specify which version of the language you want to use. So if you set it to 9, the compiler won’t allow features from 10 (supposedly; I haven’t tested it).
Re:Welcome to C# 10
by metaltyphoon on Monday November 08, 2021 @08:20PM
(#29156542)
I'm aware of <LangVersion> on the csproj but it's opt in system. You opt into the features of the version you want. It never disables anything of the prior versions.
Re:Welcome to C# 10
by colejohnson66 on Tuesday November 09, 2021 @06:58AM
(#29160479)
What do you mean “disabling” things from the prior versions?