0

Just as the title says, I'm trying to do this:

enter image description here

but I get this error.

Do you guys know what should I do ?

Thank you for your help

1 Answer 1

1

You can write like this:

  Device.BeginInvokeOnMainThread(async() => {    
         Map.Pins.Clear();
         Map.MapElements.Clear();
         await ExecuteLoadPinsCommand();    
  });
Sign up to request clarification or add additional context in comments.

4 Comments

it worked but it created another problem, the method ExecuteUpdatePinsCommand still says "this async method lacks "await" operator", what should I do ?
you can make this method ExecuteUpdatePinsCommand return type as Void like this: private void ExecuteUpdatePinsCommand() {}
But will it not make the execution of the code not wait for ExecuteUpdatePinsCommand to finish executing if I make it void ?
Your ExecuteLoadPinsCommand() method is awaited already it will wait

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.