Click here to Skip to main content
15,892,643 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: F-35 Pilot Helmet Pin
Slow Eddie1-Oct-21 2:17
professionalSlow Eddie1-Oct-21 2:17 
GeneralRe: F-35 Pilot Helmet Pin
User 991608030-Sep-21 3:52
professionalUser 991608030-Sep-21 3:52 
GeneralRe: F-35 Pilot Helmet Pin
den2k8830-Sep-21 4:02
professionalden2k8830-Sep-21 4:02 
GeneralRe: F-35 Pilot Helmet Pin
dandy7230-Sep-21 5:47
dandy7230-Sep-21 5:47 
GeneralRe: F-35 Pilot Helmet Pin
Maximilien30-Sep-21 2:55
Maximilien30-Sep-21 2:55 
GeneralRe: F-35 Pilot Helmet Pin
jeron130-Sep-21 6:14
jeron130-Sep-21 6:14 
GeneralRe: F-35 Pilot Helmet Pin
Gary Wheeler1-Oct-21 2:50
Gary Wheeler1-Oct-21 2:50 
RantC# 9 nullable reference alert Pin
Super Lloyd29-Sep-21 17:05
Super Lloyd29-Sep-21 17:05 
when you use this new feature it create plenty of warnings... lulling us into a false sense of compiler enforced code validity.. but it's all a lie!
This simple code snippet below trick the compiler and create doubly unexpected null exception Cry | :((
var list = new List<string>();
IList ilist = list;

ilist.Add(null); // no warning, all good, added!
ilist.Add("hello");
//list.Add(null); // warning
list.Add("hello");

Console.WriteLine(list[0].Length); // no null warning
Console.WriteLine(list[1].Length);

EDIT
I guess perhaps I would simply have to change my expectation and get used to it....
But it started with a disappointment...
This is only compiler sugar coating, no runtime change.

EDIT2
I had too high and unrealistic expectation from all the buzz....
Look there is even a list of Known Pitfalls on the concept MSDN page.
I guess backward compatibility is a bitch...

My top #1 annoying null from that MSDN page:
C#
var array = new string[10];

all the strings in this array are null, obviously. But the compiler will act as if it didn't know! Laugh | :laugh:
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!


modified 30-Sep-21 1:31am.

JokeRe: C# 9 nullable reference alert Pin
David O'Neil29-Sep-21 20:35
professionalDavid O'Neil29-Sep-21 20:35 
GeneralRe: C# 9 nullable reference alert Pin
Richard Deeming29-Sep-21 22:02
mveRichard Deeming29-Sep-21 22:02 
GeneralRe: C# 9 nullable reference alert Pin
Member 916705730-Sep-21 20:39
Member 916705730-Sep-21 20:39 
GeneralRe: C# 9 nullable reference alert Pin
ZevSpitz30-Sep-21 22:45
professionalZevSpitz30-Sep-21 22:45 
GeneralRe: C# 9 nullable reference alert Pin
Super Lloyd30-Sep-21 23:30
Super Lloyd30-Sep-21 23:30 
GeneralRe: C# 9 nullable reference alert Pin
obermd1-Oct-21 3:26
obermd1-Oct-21 3:26 
GeneralRe: C# 9 nullable reference alert Pin
Al Gonzalez1-Oct-21 4:10
Al Gonzalez1-Oct-21 4:10 
GeneralRe: C# 9 nullable reference alert Pin
Adam David Hill6-Oct-21 10:42
professionalAdam David Hill6-Oct-21 10:42 
GeneralRe: C# 9 nullable reference alert Pin
Super Lloyd6-Oct-21 13:23
Super Lloyd6-Oct-21 13:23 
JokeFound your next laptop Pin
raddevus29-Sep-21 10:56
mvaraddevus29-Sep-21 10:56 
GeneralRe: Found your next laptop Pin
Cp-Coder29-Sep-21 11:22
Cp-Coder29-Sep-21 11:22 
GeneralRe: Found your next laptop Pin
Mike Hankey29-Sep-21 11:39
mveMike Hankey29-Sep-21 11:39 
GeneralRe: Found your next laptop Pin
Maximilien29-Sep-21 11:59
Maximilien29-Sep-21 11:59 
GeneralRe: Found your next laptop Pin
raddevus29-Sep-21 12:04
mvaraddevus29-Sep-21 12:04 
GeneralRe: Found your next laptop Pin
David O'Neil29-Sep-21 12:12
professionalDavid O'Neil29-Sep-21 12:12 
GeneralRe: Found your next laptop Pin
Duke Carey30-Sep-21 0:26
professionalDuke Carey30-Sep-21 0:26 
GeneralRe: Found your next laptop Pin
Jon McKee29-Sep-21 12:29
professionalJon McKee29-Sep-21 12:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.