Created
September 19, 2018 05:58
-
-
Save idg10/bbb78cc21ef84d02b90c3d7a7fd2cc4e to your computer and use it in GitHub Desktop.
Fixed resource handling with Task-based deferred execution
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
public static async Task<string> GetContentAsync(string configPath) | |
{ | |
using (var reader = new StreamReader(configPath)) | |
{ | |
return await reader.ReadToEndAsync(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment