Answers for "check if char is whitespace or empty c#"

C#
7

c# check if string is empty

if (string.IsNullOrEmpty(myString)) {
   //
}
Posted by: Guest on September-03-2020
0

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
}
Posted by: Guest on October-19-2020

Code answers related to "check if char is whitespace or empty c#"

C# Answers by Framework

Browse Popular Code Answers by Language