Wednesday, June 30, 2010

String.IsNullOrWhiteSpace new super useful method in .Net 4.0

.Net 4.0 got a useful method in String , which checks for Null value or blank or consists of only white space. This really helps developers who were used to check for Null or Empty using String.IsNullOrEmpty(value) and white space characters using trim value.Trim().Length.

String.IsNullOrWhiteSpace(value)

Here are more details on MSDN.

No comments:

Post a Comment