C# 4.0 makes it easy with the new method String.IsNullOrWhiteSpace .This method finds out if the specified string contains null, empty, or consists only of white-space characters and returns the true/false accordingly .

Eg :
string input = new String(' ', 5);
if (String.IsNullOrWhiteSpace(input))
{
MessageBox.Show("String is Empty or Null or has only White Spaces");
}