C#StringString.IsNullOrWhiteSpace
String.IsNullOrEmpty

String.IsNullOrWhiteSpaceString

String.Join

Indicates whether the specified string is null, empty, or whitespace only.

문법

String.IsNullOrWhiteSpace(value)

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

string
ws
Console
WriteLine
String
IsNullOrWhiteSpace
string ws = "   ";
Console.WriteLine(String.IsNullOrWhiteSpace(ws));      // True
Console.WriteLine(String.IsNullOrWhiteSpace("hello")); // False