Some .net/mono frameworks do not support the IsNullOrWhiteSpace method. The code below provides a simple replacement.
/// <summary>
/// Indicates whether a specified string is null, empty, or consists only of white-space characters.
/// </summary>
/// <param name="value">value: The string to test.</param>
/// <returns>true if the value parameter is null or System.String.Empty, or if value consists exclusively of white-space characters.</returns>
public static bool IsNullOrWhiteSpace(this string value)
{
if (value == null)
{
return true;
}
var index = 0;
while (index < value.Length)
{
if (char.IsWhiteSpace(value[index]))
{
index++;
}
else
{
return false;
}
}
return true;
}