NetworkCommsDotNet.Tools.XPlatformHelper.SocketAddress.Equals C# (CSharp) Method

Equals() public method

public Equals ( object comparand ) : bool
comparand object
return bool
        public override bool Equals(object comparand)
        {
            SocketAddress sa = (comparand as SocketAddress);
            if ((sa != null) && (sa.data.Length == data.Length))
            {
                byte[] otherData = sa.data;
                for (int i = 0; i < data.Length; i++)
                    if (otherData[i] != data[i])
                        return false;

                return true;
            }

            return false;
        }