System.Security.SecurityElement.IsValidAttributeName C# (CSharp) Method

IsValidAttributeName() public static method

public static IsValidAttributeName ( string name ) : bool
name string
return bool
        public static bool IsValidAttributeName(string name)
        {
            return IsValidTag(name);
        }

Usage Example

 public SecurityAttribute(string name, string value)
 {
     if (!SecurityElement.IsValidAttributeName(name))
     {
         throw new ArgumentException(Locale.GetText("Invalid XML attribute name") + ": " + name);
     }
     if (!SecurityElement.IsValidAttributeValue(value))
     {
         throw new ArgumentException(Locale.GetText("Invalid XML attribute value") + ": " + value);
     }
     this._name  = name;
     this._value = SecurityElement.Unescape(value);
 }
All Usage Examples Of System.Security.SecurityElement::IsValidAttributeName