whitespace or empty 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
}
if(string.IsNullOrWhiteSpace(stringToCheck) == true){
//do thing if empty, whitespace, or null
}else{
//do thing if contains value
}