Visual Studio 2022

Discussion of chess software programming and technical issues.

Moderator: Ras

Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: Visual Studio 2022

Post by Henk »

Henk wrote: Fri May 20, 2022 12:16 pm Hi hi hi. When I set <Nullable>enable</Nullable> in project file I get hundreds of warnings. I don't think I have the patience to correct them all.

Enable here means something like that references are not allowed to be null unless you make them nullable explicitly by adding a '?' operator.
O wait record is a reference too.

Looks like I first have to learn C#
Still have hundred of annoying warnings. Why not disable this feature. I had no problems with nullable in the past.
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: Visual Studio 2022

Post by Henk »

Henk wrote: Sat May 21, 2022 5:17 pm C# code in Blazor webassembly does not even run:

Code: Select all

var bit = ExtractLowestSetBit(bits);
bits = ResetLowestSetBit(bits);
So I had to replace it with the old

Code: Select all

 var bit = bits & (~bits + 1);
 bits &= (bits - 1);
 
to make it work.

So I need a WebApi to run the first code ?
What a world we live.
I don't know but in Blazor Webassembly I was unable to bind a function returning a property to value of checkbox. Might be that it is possible but can't find how. So i had to create an extra view (model) containing that property. Maybe it is normal to always create a view model I don't know. Even if you don't need it.
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: Visual Studio 2022

Post by Henk »

Henk wrote: Mon Jun 13, 2022 12:53 pm
Henk wrote: Fri May 20, 2022 12:16 pm Hi hi hi. When I set <Nullable>enable</Nullable> in project file I get hundreds of warnings. I don't think I have the patience to correct them all.

Enable here means something like that references are not allowed to be null unless you make them nullable explicitly by adding a '?' operator.
O wait record is a reference too.

Looks like I first have to learn C#
Still have hundred of annoying warnings. Why not disable this feature. I had no problems with nullable in the past.
After few hours work I still have 70 warnings. Can't trust these people. Better they have asked

"Are you absolutely sure that you really want to enable this stupid feature?"