DeviceInformation.Id 屬性

定義

表示裝置身分識別的字串。

public:
 property Platform::String ^ Id { Platform::String ^ get(); };
winrt::hstring Id();
public string Id { get; }
var string = deviceInformation.id;
Public ReadOnly Property Id As String

屬性值

String

Platform::String

winrt::hstring

表示裝置身分識別的字串。

備註

此識別碼可用來在實作裝置功能的類別上使用 CreateFromIdAsync 方法來啟用裝置功能。

根據預設,呼叫 DeviceInformation.FindAllAsync 會傳回 DeviceInformation 物件的集合,這些物件描述裝置介面 (,而不是裝置) 。 因此,這些物件的 DeviceInformation.Id 值是裝置介面識別碼 (,而不是裝置識別碼) 。 DeviceInformation.FindAllAsync的多載可讓您傳遞DeviceInformationKind來控制傳回的DeviceInformation物件是否代表裝置、裝置介面或其他種類的資訊。

適用於