Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

In .NET 4.0, we can use string.IsNullOrWhiteSpace() method to check for empty spaces also

Aug 5 2011 3:38AM by Kirti M.Darji   

In Earlier versions of .NET, String class has IsNullOrEmpty() method, which can be used to check whether the string is null or empty. To check for white spaces, we need to write additional code. Now .NET 4.0 introduced a new method, IsNullOrWhiteSpace() in string class, which will check for white space characters also. White space characters include all characters that are not visible on screen by example space, line break, tab and empty string etc.

if(string.IsNullOrWhiteSpace(strUrl)
{
//do something
} 
Read More..   [32134 clicks]

Published under: Microsoft .NET Tips ·  ·  ·  · 


Kirti M.Darji
10 · 16% · 4980
4
 
1
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

3  Comments  

  • Very nice tip kirti........it is very useful..

    commented on Aug 5 2011 12:31AM
    Ramireddy
    2 · 41% · 12972
  • Thank You Rami.

    commented on Aug 5 2011 1:11AM
    Kirti M.Darji
    10 · 16% · 4980
  • Useful information

    commented on Aug 19 2011 12:24AM
    Suresh
    1443 · 0% · 14

Your Comment


Sign Up or Login to post a comment.

"In .NET 4.0, we can use string.IsNullOrWhiteSpace() method to check for empty spaces also" rated 5 out of 5 by 4 readers
In .NET 4.0, we can use string.IsNullOrWhiteSpace() method to check for empty spaces also , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]