マイコンピュータは、以下のコードによって返されるべき作業スマートカードリーダーを持っている:コードスニペットはMicrosoft's C# Sample Codeawait構文を使用してWindows.Devices.Enumeration.DeviceInformation.FindAllAsyncから結果を読み取る方法?
からコピーされError CS4036 '
IAsyncOperation<DeviceInformationCollection>
' does not contain a definition for 'GetAwaiter
' and no extension method 'GetAwaiter
' accepting a first argument of type 'IAsyncOperation<DeviceInformationCollection>
' could be found (are you missing a using directive for 'System
'?)
:
string selector = Windows.Devices.SmartCards.SmartCardReader.GetDeviceSelector();
Windows.Devices.Enumeration.DeviceInformationCollection devices = await Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(selector);
はしかし、私はこのエラーを取得しています
このエラーを解決するにはどうすればよいですか?