Skip to content

Instantly share code, notes, and snippets.

@JayBazuzi
Created August 3, 2015 22:38
Show Gist options
  • Save JayBazuzi/fd6441e56255e5770686 to your computer and use it in GitHub Desktop.
Save JayBazuzi/fd6441e56255e5770686 to your computer and use it in GitHub Desktop.
void Caller1(C c, I i)
{
c.F1(); // No warning
c.F2(); // CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
i.F3(); // No warning
}
async Task Caller2(C c, I i)
{
c.F1(); // CS4014
c.F2(); // CS4014
i.F3(); // CS4014
}
class C
{
public Task F1()
{
}
public async Task F2()
{
}
}
interface I
{
/*async*/Task F3();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment