Home

Status of Language preview feature Null-checking parameters !!

Not sure if this is a bug or just because it is a preview feature but the following throws a System.NullReferenceException when compiling

void Main()
{
    System.Environment.Version.Dump();
    Test(null); 
}

private void Test(string x!!)
{
    x.Dump(); 
}

'Enable C#/F# Preview Features' in preferences is checked.

Comments

Sign In or Register to comment.