How can I check whether a string variable is empty or null in C#? [duplicate]

if (string.IsNullOrEmpty(myString)) {
   //
}

Leave a Comment