DeviceInformation.Id プロパティ

定義

デバイスの 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

デバイスの ID を表す文字列。

注釈

この ID は、デバイス機能を実装するクラスで CreateFromIdAsync メソッドを使用してデバイス機能をアクティブ化するために使用できます。

既定では、 DeviceInformation.FindAllAsync を呼び出すと、(デバイスではなく) デバイス インターフェイスを記述する DeviceInformation オブジェクトのコレクションが返されます。 したがって、これらのオブジェクトの DeviceInformation.Id の値は、(デバイス識別子ではなく) デバイス インターフェイス識別子です。 DeviceInformation.FindAllAsync にはオーバーロードがあり、DeviceInformationKind を渡して、返される DeviceInformation オブジェクトがデバイス、デバイス インターフェイス、またはその他の種類の情報を表すかどうかを制御できます。

適用対象