System.Windows.Automation.AutomationElement.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            int[] runtimeId = GetRuntimeId();
            int num = 0;
            if (runtimeId == null)
            {
                throw new InvalidOperationException("Operation cannot be performed");
            }
            foreach (int i in runtimeId)
            {
                num = (num * 4) ^ i;
            }
            return num;
        }

Usage Example

Example #1
0
 public static void AutomationElementGetHashCode(AutomationElement element)
 {
     Dump("GetHashCode()", true, element);
     try
     {
         object obj = element.GetHashCode();
     }
     catch (Exception exception)
     {
         VerifyException(element, exception, typeof(ElementNotAvailableException));
     }
 }