Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

The await operator can only be used within an async method

10.08.2018 (👁3208)

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