8 ms·
The smart thing that C# has though is automatic conversion to non-nullable references, e.g.: void foo1(Bar bar) { ... } void foo2(Bar? bar
by wizofaus 4y ago
The smart thing that C# has though is automatic conversion to non-nullable references, e.g.:
void foo1(Bar bar)
{
...
}
void foo2(Bar? bar)
{
if (bar != null)
foo1(bar);
}
Which wouldn't compile if you didn't have the `if` condition.