Dot Net Solvents
Thursday, 8 July 2010
EXTENSION METHOD TO TEST WHETHER A STRING IS NULL OR EMPTY OR WHITESPACE
public
static
bool
IsNullOrEmpty
(
this
string
input
)
{
if
(
string
.
IsNullOrEmpty
(
input
)
)
return
true;
return
string
.
IsNullOrEmpty
(
input.
Trim
(
)
)
;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment