Checking a string if it is empty!

We usually use the code below to check if a string is empty.

if(s=="")

Use the code below for 3 times quicker way.

if(s.Length==0)

If the string "s" may has some spaces s="  ", you can use this code:

if(s.Trim().Length==0)

And if you also want to check the strinf if it is NULL, use:

if(String.IsNullOrEmpty(s.Trim()))