出现了需要等待运算符的方法的错误,但我在哪里放置它们以及什么是await运算符和async和Task? :)
public async void OnLocationChanged(Location location)
{
_currentLocation = location;
if (_currentLocation == null)
{
_locationText.Text = "Unable to determine your location. Try again in a short while.";
}
else
{
_locationText.Text = string.Format("{0:f6},{1:f6}", _currentLocation.Latitude, _currentLocation.Longitude);
as
}
}
我想在上面的示例中获得特定帮助:)
答案 0 :(得分:1)
从方法的签名中删除asycn关键字!
public void OnLocationChanged(Location location)