예제 #1
0
        public bool Equals(Turn t)
        {
            // If parameter is null return false:
            if ((object)t == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return((Active.Equals(t.Active)) && (Passive.Equals(t.Passive)));
        }
예제 #2
0
        public override bool Equals(System.Object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }
            if ((System.Object)obj == null)
            {
                return(false);
            }
            // If parameter cannot be cast to Turn return false.
            Turn t = obj as Turn;

            // Return true if the fields match:
            return((Active.Equals(t.Active)) && (Passive.Equals(t.Passive)));
        }