예제 #1
0
 public override int GetHashCode()
 {
     return
         (InstanceCount.GetHashCode() ^
          Name.GetHashCode());
 }
예제 #2
0
    /// <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()));
        }
    }