Null Conditional Operator (?.)
Also known as Null-Propagation operator
return myvalue?.SubString(0,5);
Instead of
string smaller = myvalue;
if (myvalue != null)
{
smaller = myvalue.SubString(0,5);
}
return smaller
PropertyChanged?.Invoke(propertyChanged(this, new PropertyChangedEventArgs(nameof(Name));
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext