Logo

Programming-Idioms

History of Idiom 110 > diff from v29 to v30

Edit summary for version 30 by polyfill:
New Csharp implementation by user [polyfill]

Version 29

2019-09-26, 13:55:10

Version 30

2019-09-26, 13:58:37

Idiom #110 Check if string is blank

Set boolean blank to true if string s is empty, or null, or contains only whitespace ; false otherwise.

Idiom #110 Check if string is blank

Set boolean blank to true if string s is empty, or null, or contains only whitespace ; false otherwise.

Imports
System;
Code
bool blank = string.IsNullOrWhiteSpace(s);
Doc URL
https://docs.microsoft.com/en-us/dotnet/api/system.string.isnullorempty?view=netframework-4.8