Last active
December 25, 2020 07:30
-
-
Save kevingosse/20936a96e3b5177a0f224a470870a04e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IInterface | |
{ | |
void DoSomething(); | |
} | |
class Implementation : IInterface | |
{ | |
public void DoSomething() | |
{ | |
// This method can't return a Task, | |
// delegate the async code to another method | |
_ = DoSomethingAsync(); | |
} | |
private async Task DoSomethingAsync() | |
{ | |
await Task.Delay(100); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment