Logo

Programming-Idioms

History of Idiom 110 > diff from v66 to v67

Edit summary for version 67 by zqwnvl:
[C#] Remove unnecessary import

Version 66

2021-08-19, 09:05:41

Version 67

2021-08-19, 09:06:27

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;
Imports
Code
bool blank = string.IsNullOrWhiteSpace(s);
Code
bool blank = string.IsNullOrWhiteSpace(s);
Doc URL
https://docs.microsoft.com/en-us/dotnet/api/system.string.isnullorempty?view=netframework-4.8
Doc URL
https://docs.microsoft.com/en-us/dotnet/api/system.string.isnullorempty?view=netframework-4.8