c# - Win10 BLE desktop application IAsyncOperation as collection -
i working on upgrading desktop app run on windows 10 ble support. modified app target corresponding windows version described in this question (how can reference windows 8 runtime in console). trying step step in this example (using ble gatt services windows 10). first of need run ble scan follows:
var devices = deviceinformation.findallasync(gattdeviceservice.getdeviceselectorfromuuid(gattserviceuuids.heartrate)); if (devices != null) { foreach (deviceinformation device in devices) { // add device ui here } }
but on compilation error related foreach loop, here error:
error cs1579 foreach statement cannot operate on variables of type 'windows.foundation.iasyncoperation' because 'windows.foundation.iasyncoperation' not contain public definition 'getenumerator'
Comments
Post a Comment