Anthony Steele · @anthony_steele
250 followers · 2864 posts · Server dotnet.social

for people, when we have checking on, how do you feel about DTO fields initialised to " = null!;"
e.g.

public string Name { get; set; } = null!;

It seems wrong to me "Name is not nullable, and also, surprise, it's null!"

It seems like that could go wrong.
But if it's the accepted idiom than I'll go with it.

Is there a better one?
"= string.Empty;" is verbose.

What do you think?

#dotnet #nullable

Last updated 1 year ago

billseipel · @billseipel
90 followers · 753 posts · Server fosstodon.org

I'm being punished.

I've done something to anger the gods. lol

#LINQ #dotnet #nullable #hell

Last updated 1 year ago

billseipel · @billseipel
90 followers · 752 posts · Server fosstodon.org

I am dying of nullable type-itis.

#LINQ #dotnet #nullable #hell

Last updated 1 year ago

酸性雨 · @acid_rain
948 followers · 172773 posts · Server amefur.asia

ASP.NET Core,やっぱまだあちこちに disable が残ってるなぁ

#nullable

Last updated 1 year ago

JaykeBird · @jaykebird
6 followers · 39 posts · Server dotnet.social

Maybe not that controversial take, but I love the nullable feature in C#. There are occasional situations where the nullable warning appears and I'm like "why???" But all in all, it has been a great help, and has generally made me a better programmer, even when doing stuff with .NET Framework.

#dotnet #csharp #nullable #Coding

Last updated 2 years ago

VincentH.NET · @VincentH_NET
61 followers · 8 posts · Server fosstodon.org

2 for and @unoplatform is coming along nicely🙂

-🔥Windows C# updates UI on Ctrl+S
- All 7 target platforms, 11
- Nested view files in sln explorer
- Fully + enabled dotnet new template

#CSharpForMarkup #WinUI3 #HotReload #dotnet #csharp #nullable #editorconfig

Last updated 2 years ago

I use :vim: · @asteroidrainfall
47 followers · 588 posts · Server fosstodon.org

Is there a recommended pattern to follow when dealing with types in ?

This snippet is just from the quickstart guide. Since data maybe null when fetched from the Supabase bucket, TS complains since createObjectURL requires the parameter.

I know that I could guard the line with an "if" statement but that just seems unnecessary. Like there should be a more elegant solution, something like optional chaining. :thinking: :javascript: :react:

#nullable #typescript #Supabase #nextjs

Last updated 2 years ago

enableどこにおけばいいんだ

#nullable

Last updated 2 years ago

staticけして つけたらちゃんと怒られた

#nullable

Last updated 2 years ago

こあ · @core
147 followers · 6493 posts · Server darui.work

まあC#8.0なら enableあるけど

#nullable

Last updated 5 years ago