Trigrad.DataTypes.Sample.Equals C# (CSharp) 메소드

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool
        public override bool Equals(object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return false;
            }

            // If parameter cannot be cast to Point return false.
            Sample s = obj as Sample;
            if (s == null)
                return false;

            // Return true if the fields match:
            return (Point == s.Point);
        }