I am trying to call async method from property. my code is
private Command _forgotCommand;
public Command ForgotCommand
{
get
{
return _forgotCommand ?? (_forgotCommand = new Command(ForgotCommandAssetCommand));
}
}
private async void ForgotCommandAssetCommand()
{
await ForgotPasswordApiCall();
}
Now i want to use Task instead of void ( private async void ForgotCommandAssetCommand()) in this line .it gives me error as "Task has wrong return type" Any Suggestions?