Example #1
0
 public static string ToString(IdentifierUse value)
 {
     if (value == IdentifierUse.Usual)
     {
         return("usual");
     }
     else if (value == IdentifierUse.Official)
     {
         return("official");
     }
     else if (value == IdentifierUse.Temp)
     {
         return("temp");
     }
     else
     {
         throw new ArgumentException("Unrecognized IdentifierUse value: " + value.ToString());
     }
 }
Example #2
0
            public static bool TryParse(string value, out IdentifierUse result)
            {
                result = default(IdentifierUse);

                if (value == "usual")
                {
                    result = IdentifierUse.Usual;
                }
                else if (value == "official")
                {
                    result = IdentifierUse.Official;
                }
                else if (value == "temp")
                {
                    result = IdentifierUse.Temp;
                }
                else
                {
                    return(false);
                }

                return(true);
            }
Example #3
0
            public static bool TryParse(string value, out IdentifierUse result)
            {
                result = default(IdentifierUse);

                if( value=="usual")
                    result = IdentifierUse.Usual;
                else if( value=="official")
                    result = IdentifierUse.Official;
                else if( value=="temp")
                    result = IdentifierUse.Temp;
                else
                    return false;

                return true;
            }
Example #4
0
 public static string ToString(IdentifierUse value)
 {
     if( value==IdentifierUse.Usual )
         return "usual";
     else if( value==IdentifierUse.Official )
         return "official";
     else if( value==IdentifierUse.Temp )
         return "temp";
     else
         throw new ArgumentException("Unrecognized IdentifierUse value: " + value.ToString());
 }