How to easily check if a string is blank or full of an undetermined amount of spaces, or not?
If you have .NET 4, use the string.IsNullOrWhiteSpace
method:
if(string.IsNullOrWhiteSpace(myStringValue))
{
// ...
}
If you don't have .NET 4, and you can stand to trim your strings, you could trim it first, then check if it is empty.
Otherwise, you could look into implementing it yourself:
.Net 3.5 Implementation of String.IsNullOrWhitespace with Code Contracts