public override int GetHashCode() { unchecked { var hashCode = (int)BackBufferFormat; hashCode = (hashCode * 397) ^ BackBufferHeight; hashCode = (hashCode * 397) ^ BackBufferWidth; hashCode = (hashCode * 397) ^ (int)DepthStencilFormat; hashCode = (hashCode * 397) ^ (DeviceWindowHandle != null ? DeviceWindowHandle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IsFullScreen.GetHashCode(); hashCode = (hashCode * 397) ^ (int)MultisampleCount; hashCode = (hashCode * 397) ^ (int)PresentationInterval; hashCode = (hashCode * 397) ^ RefreshRate.GetHashCode(); hashCode = (hashCode * 397) ^ PreferredFullScreenOutputIndex; hashCode = (hashCode * 397) ^ (int)ColorSpace; return(hashCode); } }