System.Net.Internals.SocketAddress.Equals C# (CSharp) Method

Equals() public method

public Equals ( object comparand ) : bool
comparand object
return bool
        public override bool Equals(object comparand)
        {
            SocketAddress castedComparand = comparand as SocketAddress;
            if (castedComparand == null || this.Size != castedComparand.Size)
            {
                return false;
            }
            for (int i = 0; i < this.Size; i++)
            {
                if (this[i] != castedComparand[i])
                {
                    return false;
                }
            }
            return true;
        }