コード例 #1
0
        public override bool Equals(object obj)
        {
            ServerEnum e = obj as ServerEnum;

            if (e == null)
            {
                return(false);
            }

            // Must be in the inheritance hierarchy of each other to be equal
            // eg, Status enum can't be equal to Type enum.
            if (GetType().IsAssignableFrom(obj.GetType()) ||
                obj.GetType().IsAssignableFrom(GetType()))
            {
                return(e.Enum == Enum);
            }
            return(false);
        }
コード例 #2
0
 public string GetLocalizedLongDescription(ServerEnum serverEnum)
 {
     return(serverEnum.LongDescription);
 }