private static ulong TryGetDevicePropertyInteger(HalDevice device, string propertyName) { //if the property does not exist, we don't care try { return device.GetPropertyInteger(propertyName); } catch { } return 0; }