c# check multiple variables for null code example
Example 1: c# check multiple variables for null
bool allNull = strings.All(s => s == null);
// if you are using a collection
Example 2: check if multiple variables are null c#
if((string1 ?? string2 ?? string3 ?? string4 ?? string5 ?? string6) == null){ ;}