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 对象。

适用于