Getting error:
Error CS4010: Cannot convert async lambda expression to delegate type 'Func'. An async lambda expression may return void, Task or Task, none of which are convertible to 'Func
UIAccessibilityCustomAction someAccessibilityAction = new
UIAccessibilityCustomAction(
SwipeActionMarkTextValue("Accessibility Text", false),
async (UIAccessibilityCustomAction arg) =>{
await TestAsyncMethod();
return true;
});
private async Task<bool> TestAsyncMethod()
{
await Task.Delay(5000);
return true;
}
bool- SushiHangoverTask<bool>that will have a true result 5 seconds later. Big difference. - Servy