The 'await' operator can only be used within an
async method. Consider marking this method with the 'async' modifier and
changing its return type to 'Task'.
Fehlermeldung:
The 'await' operator can only be used within an async method. Consider
marking this method with the 'async' modifier and changing its return type to
'Task'.
|
Lösung:
Einfach ein async in die übergeorndete Methode einfügen
private async void BtnRead_Groups_Click(object sender, RoutedEventArgs e)
{
//--------< BtnRead_Groups_Click() >--------
optStop.IsChecked = false;
await fxMain_Scan_Groups();
//--------</ BtnRead_Groups_Click() >--------
}
|
Severity
|
Code
|
Description
|
File
|
Project
|
Line
|
Suppression State
|
Error
|
CS4033
|
The 'await' operator can only be used within an async method. Consider
marking this method with the 'async' modifier and changing its return type to
'Task'.
|
D:\Programmierung\Web\Freelance\_Robots\20180810_robot_Hays\robot\MainWindow.xaml.cs
|
robot
|
88
|
N/A
|