79354075

Date: 2025-01-14 05:46:53
Score: 1.5
Natty:
Report link

stranger. Set return type Task instead of void.

// this throw an Exception
protected async void OnLogin()
{
    navigationManager.NavigateTo("/");
}

// this this works in my case
protected async Task OnLogin()
{
    navigationManager.NavigateTo("/");
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Baurzhan