using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Async_Await { class Program { static void Main(string[] args) { LlamadoMetodo(); Console.WriteLine("Presione una tecla para salir"); Console.ReadKey(); } static private async void LlamadoMetodo() { var result = await ProcesoAsync("EJEMPLO"); Console.WriteLine("Tarea {0} Iniciada - ", result); } static private Task<string> ProcesoAsync(string texto) { return Task.Factory.StartNew(() => Proceso(texto)); } static private string Proceso(string texto) { Thread.Sleep(2000); return "HOLA : " + texto; } } }