System.Runtime.Serialization.StreamingContext.Equals C# (CSharp) Méthode

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat 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

        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);
        }