Skip to content

Instantly share code, notes, and snippets.

@bjartwolf
Created May 3, 2021 05:00
Show Gist options
  • Save bjartwolf/6baf4de886f2dce0ea9265f8c903e1c2 to your computer and use it in GitHub Desktop.
Save bjartwolf/6baf4de886f2dce0ea9265f8c903e1c2 to your computer and use it in GitHub Desktop.
public async Task<int> mywebcontroller (int input) {
if (input == 2) {
return 4;
} else {
await Task.Delay(1000);
return 3;
}
}
async void Main()
{
Console.WriteLine(await mywebcontroller(2));
Console.WriteLine(await mywebcontroller(4));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment