METHOD
String.IsNullOrEmpty
Returns true for null or a zero-length string. Whitespace-only text is not empty; choose a separate whitespace policy when appropriate.
Formal Syntax & Structure
csharp syntaxcsharp
string.IsNullOrEmpty(value)Working Example
Example Snippetcsharp
using System;Console.WriteLine(string.IsNullOrEmpty(" ")); // False