mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
888 B
57 lines
888 B
using System; |
|
using System.Threading.Tasks; |
|
|
|
internal class AsyncSteppingEntryPoint |
|
{ |
|
public static async Task Main() |
|
{ |
|
try |
|
{ |
|
await Task.Yield(); |
|
Console.WriteLine("main"); |
|
} |
|
catch (InvalidOperationException e) |
|
{ |
|
Console.WriteLine(e.Message); |
|
} |
|
} |
|
|
|
public static async Task Main(int notTheEntryPoint) |
|
{ |
|
try |
|
{ |
|
await Task.Yield(); |
|
Console.WriteLine(notTheEntryPoint); |
|
} |
|
catch (InvalidOperationException e) |
|
{ |
|
Console.WriteLine(e.Message); |
|
} |
|
} |
|
|
|
public static async Task NotTheEntryPointAsync() |
|
{ |
|
try |
|
{ |
|
await Task.Yield(); |
|
Console.WriteLine("other"); |
|
} |
|
catch (InvalidOperationException e) |
|
{ |
|
Console.WriteLine(e.Message); |
|
} |
|
} |
|
|
|
public static async void FireAndForget() |
|
{ |
|
try |
|
{ |
|
await Task.Yield(); |
|
Console.WriteLine("done"); |
|
} |
|
catch (InvalidOperationException e) |
|
{ |
|
Console.WriteLine(e.Message); |
|
} |
|
} |
|
}
|
|
|