by styfle · 9y ago · 0 comments
Looking at the examples, the compiler can determine if not null by reading the if statement like so
if (str != null)
But what about if the code uses the following? if (!string.IsNullOrEmpty(str))
TypeScript has a way to solve this using the `is` keyword but I'm not sure if this is introduced in C# yet.No comments yet.