System.Runtime.Serialization.StreamingContext.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            if (!(obj is StreamingContext))
                return false;

            var other = (StreamingContext) obj;
            return State == other.State &&
                   Context == other.Context;
        }

Usage Example

Ejemplo n.º 1
0
        public override bool Equals(Object obj)
        {
            if (obj == null || !(obj is SurrogateKey))
            {
                return(false);
            }
            SurrogateKey other = (SurrogateKey)obj;

            if (m_type == other.m_type && m_context.Equals(other.m_context))
            {
                return(true);
            }
            return(false);
        }