Example #1
0
        public static bool TryParse(string s, out YesNo result)
        {
            if (string.IsNullOrEmpty("s"))
                throw new ArgumentNullException("s");

            switch (s.ToLowerInvariant())
            {
                case "yes":
                    result = Yes;
                    return true;

                case "no":
                    result = No;
                    return true;

                default:
                    result = No;
                    return false;
            }
        }
Example #2
0
 public bool Equals(YesNo other)
 {
     return other._value.Equals(_value);
 }
Example #3
0
 public bool Equals(YesNo other)
 {
     return(other._value.Equals(_value));
 }