Is using null generally discouraged in C#?

Coming from a Java background im starting to learn C#, it seems theres a lot of things to prevent you using null values. But I just learned it can be done by putting a ? at the end of the type declaration.

In Java use of null didn't seem to be a big deal, it seemed like a standard way to indicate nothing. Should its use be limited to niche cases that cant be avoided in C#? Should I use some other means to indicate nothing rather than null? If so whats the reason for that?

by maxp779 via /r/csharp

Leave a Reply