I get a red line under my await
in my code saying:
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
Though the code compiles and seems to work fine, I just wonder what this means? (English is not my first language, so I might just not understand the message)
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;
}
Updated resharper to latest version, solved issue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With