Created
June 7, 2017 08:37
-
-
Save supreettare/43a1b3c514e7d82ee8dc002f86612bbe to your computer and use it in GitHub Desktop.
What is the output of the program below? Explain your answer.
This file contains hidden or 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
| class Program { | |
| private static string result; | |
| static void Main() { | |
| SaySomething(); | |
| Console.WriteLine(result); | |
| } | |
| static async Task<string> SaySomething() { | |
| await Task.Delay(5); | |
| result = "Hello world!"; | |
| return “Something”; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello world!