public static bool TryGetIUnknownValue(this IPortableDeviceValues values, PropertyKey key, out object value) { if (values.HasKeyValue(key)) { values.GetIUnknownValue(ref key, out value); return(true); } value = null; return(false); }