c# check if string is null or empty or whitespace c# code example
Example: best practice c# check if string is null or whitespace
if(string.IsNullOrWhiteSpace(stringToCheck) == true){
//do thing if empty, whitespace, or null
}else{
//do thing if contains value
}