String.IsNullOrWhiteSpace

Added in .NET 4.0


Instead of

if (String.IsNullOrEmpty(variable.Trim())) 
{
}

use

if (String.IsNullOrWhiteSpace(variable)) 
{
}





© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext