New function string.IsNullOrWhiteSpace() in VS2010


New function string.IsNullOrWhiteSpace() is available for Checking String variables.

We have already used variable string.IsNullOrEmpty to check whether string is empty or null. But in case the string is having whitespaces then we were using string.trim() to trim the whitespaces.

Now in VS2010 we can achieve the same using a single function string.IsNullOrWhiteSpace().

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s