BluetoothDevice.FromIdAsync(String) 方法

定义

返回由给定 DeviceId 标识的 BluetoothDevice 对象。

public:
 static IAsyncOperation<BluetoothDevice ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<BluetoothDevice> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BluetoothDevice> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of BluetoothDevice)

参数

deviceId
String

Platform::String

winrt::hstring

用于标识 BluetoothDevice 实例的 DeviceId 值。

返回

异步操作完成后,返回由给定 DeviceId 标识的 BluetoothDevice 对象。

属性

Windows 要求

应用功能
bluetooth

注解

必须从 UI 线程调用此方法。

适用于