コード例 #1
0
            public int CompareTo(object value)
            {
                Bad9 rhs = (Bad9)value;

                int result = name.CompareTo(rhs.name);                  // no address

                return(result);
            }
            public override bool Equals(object obj)
            {
                Bad9 rhs = obj as Bad9;

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

                return(State == rhs.State);
            }
コード例 #3
0
            public override bool Equals(object obj)
            {
                Bad9 rhs = obj as Bad9;

                if ((object)rhs == null)
                {
                    return(false);
                }

                return(this == rhs);
            }