Chain ?? operator


You can chain more than one nullable variable and if all null it return string.Empty

string value = valx ?? valy?? valz ?? string.Empty;

Nice isnt it ?

Unknown's avatarAbout bpostaci
Escalation Engineer in Microsoft.

Leave a comment