共用方式為


ProximitySensor.FromId(String) 方法

定義

從其識別碼取得鄰近感應器。

public:
 static ProximitySensor ^ FromId(Platform::String ^ sensorId);
 static ProximitySensor FromId(winrt::hstring const& sensorId);
public static ProximitySensor FromId(string sensorId);
function fromId(sensorId)
Public Shared Function FromId (sensorId As String) As ProximitySensor

參數

sensorId
String

Platform::String

winrt::hstring

感應器識別碼。

傳回

從其識別碼傳回 ProximitySensor 物件。

適用於