public override int GetHashCode() { return (InstanceCount.GetHashCode() ^ Name.GetHashCode()); }
/// <summary> /// GetHashCode() should be overridden whenever Equals() is, such that you never /// have a case where Equal() objects have differing hash codes. /// </summary> /// <param name="other"></param> /// <returns></returns> public override int GetHashCode() { int baseHashCode = base.GetHashCode(); if (IsCSharpCallback) { return(baseHashCode); } else { return(baseHashCode + EntryPoint.GetHashCode() + (InstanceCount == 0 ? 0 : InstanceCount.GetHashCode())); } }