我的代码中有一条红线await说:
The type arguments for method 'TaskAwaiter<TResult> System.WindowsRuntimeSystemExtensions.GetAwaiter<TResult>(this Windows.Foundation.IAsyncOperation 1)' cannot be inferred from the usage. Try specifying the type arguments explicitly
虽然代码编译并且似乎工作正常,但我只是想知道这意味着什么?(英语不是我的第一语言,所以我可能只是不理解这个消息)
private async void Init()
{
var settings = new I2cConnectionSettings(I2CAddress);
settings.BusSpeed = I2cBusSpeed.StandardMode;
var aqs = I2cDevice.GetDeviceSelector(I2CControllerName);
var dis = await DeviceInformation.FindAllAsync(aqs);
_device = await I2cDevice.FromIdAsync(dis[0].Id, settings);
_isInited = true;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
364 次 |
| 最近记录: |