Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Runtime.CompilerServices;
- namespace ConsoleApplication59
- {
- class Program
- {
- private static void Main()
- {
- MainAsync();
- }
- private async static void MainAsync()
- {
- await Foo();
- }
- static TA Foo()
- {
- return new TA();
- }
- }
- class TA { }
- static class TAEx
- {
- public static TaskAwaiter GetAwaiter(this TA ta)
- {
- return new TaskAwaiter();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment