Showing how COOL .NET is!
Thought I'd post a quick extension method that I made today. Hope it helps someone.
public static string RemoveWhitespace(this string str)
{
try
return new Regex(@"\s*").Replace(str, string.Empty);
}
catch (Exception)
return str;