Still have hundred of annoying warnings. Why not disable this feature. I had no problems with nullable in the past.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#
Visual Studio 2022
Moderator: Ras
-
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Visual Studio 2022
-
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Visual Studio 2022
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 wrote: ↑Sat May 21, 2022 5:17 pm C# code in Blazor webassembly does not even run:So I had to replace it with the oldCode: Select all
var bit = ExtractLowestSetBit(bits); bits = ResetLowestSetBit(bits);
to make it work.Code: Select all
var bit = bits & (~bits + 1); bits &= (bits - 1);
So I need a WebApi to run the first code ?
What a world we live.
-
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Visual Studio 2022
After few hours work I still have 70 warnings. Can't trust these people. Better they have askedHenk wrote: ↑Mon Jun 13, 2022 12:53 pmStill have hundred of annoying warnings. Why not disable this feature. I had no problems with nullable in the past.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#
"Are you absolutely sure that you really want to enable this stupid feature?"