Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IsEmpty
Message
From
04/03/2010 14:07:54
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01452408
Message ID:
01452577
Views:
35
Yup, here is the relevant portion.
/// <summary>
/// Returns a logical value indicating if the string value is empty.
/// If allowEmptyValue = true, empty means an empty string
/// If allowEmptyValue = false, empty means an empty or null string 
/// </summary>
/// <param name="value">String value</param>
/// <param name="allowEmptyValue">Specifies if an empty string is allowed</param>
/// <returns>True if empty, otherwise false</returns>
public static bool IsEmpty(string value, bool allowEmptyValue)
{
     if (allowEmptyValue)
     {
          return value == null;
     }
     else
     {
          return String.IsNullOrEmpty(value);
     }
}
>
>>Hey thanks for the response Bob. I have reviewed the help information. What I don't get is what is the meaning of "Empty"? I know what NULL is...
>>
>>A users interpretation of Empty is if they do not see any characters, then it's Empty. I tend to agree. It appears that the MM.NET framework BLG does not interprete it this way when building rules. I just hate to have to over-ride the generated code worrying that a rule for an Empty string will not indicate the string is Empty (no visible characters).
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform