I just saw this in a project I downloaded from Code Project:
base.DialogResult = this.Result != null;
I don’t consider myself new to C# but this one is new to me. Can anyone tell me what’s going on with this statement?
Edit Great answers, thanks. I’ve just never used that before.
If you add parens it’s easier to read (and understand). The logical comparison operator
!=precedes the assignment operator=:The same statement, even more verbose: