CSharp examples for Thread Asynchronous:Async
Read file asynchronously
using System;/* www .j av a 2 s . c om*/ using System.IO; class Program { static async void Main(string[] args) { using (StreamReader reader = new StreamReader("test-file.txt")) { string contents = await reader.ReadToEndAsync(); Console.WriteLine("File contents:"); Console.WriteLine(contents); } } }