Lamp.DeviceId 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得燈光裝置的 DeviceInformation 識別碼 。
public:
property Platform::String ^ DeviceId { Platform::String ^ get(); };
winrt::hstring DeviceId();
public string DeviceId { get; }
var string = lamp.deviceId;
Public ReadOnly Property DeviceId As String
屬性值
燈光裝置的 DeviceInformation 識別碼 。
備註
將此識別碼傳遞至 FromIdAsync 方法,以擷取相關聯的 Lamp 物件。 實作 DeviceWatcher.Removed 事件的處理常式,並將 DeviceInformationUpdate 引數的識別碼與 Lamp 物件的識別碼進行比較,以在裝置無法使用時收到通知。