static void Main() { HiloDelegado h1 = new HiloDelegado(); Thread t = new Thread(h1.Escribir); t.Start(); }
static void Main(String[] args) { if (args.Length > 0){ HiloDelegado h1 = new HiloDelegado(); Thread t = new Thread (delegate() { h1.Escribir(args[0]); }); t.Start(); }else Console.WriteLine("Parámetros incorrectos!!"); }
static void Main(String[] args) { if (args.Length > 0){ string nombre = args[0]; HiloDelegado h1 = new HiloDelegado(); Thread t = new Thread (delegate() { h1.Escribir(nombre); }); nombre = "no definido"; t.Start(); }else Console.WriteLine("Parámetros incorrectos!!"); }
static void Main(String[] args) { if (args.Length > 0){ HiloDelegado h1 = new HiloDelegado(); h1.nombre = args[0]; Thread t = new Thread (h1.Escribir); t.Start(); HiloDelegado h2 = new HiloDelegado(); h2.nombre = "nombre x"; Thread t1 = new Thread (h2.Escribir); t1.Start(); }else Console.WriteLine("Parámetros incorrectos!!"); }
static void Main(String[] args) { if (args.Length > 0) { HiloDelegado h1 = new HiloDelegado(); Thread t = new Thread(delegate() { h1.Escribir(args[0]); }); t.Start(); } else { Console.WriteLine("Parámetros incorrectos!!"); } }
static void Main(String[] args) { if (args.Length > 0) { string nombre = args[0]; HiloDelegado h1 = new HiloDelegado(); Thread t = new Thread(delegate() { h1.Escribir(nombre); }); nombre = "no definido"; t.Start(); } else { Console.WriteLine("Parámetros incorrectos!!"); } }
static void Main(String[] args) { if (args.Length > 0) { HiloDelegado h1 = new HiloDelegado(); h1.nombre = args[0]; Thread t = new Thread(h1.Escribir); t.Start(); HiloDelegado h2 = new HiloDelegado(); h2.nombre = "nombre x"; Thread t1 = new Thread(h2.Escribir); t1.Start(); } else { Console.WriteLine("Parámetros incorrectos!!"); } }
static void Main() { HiloDelegado h1 = new HiloDelegado(); Thread t = new Thread (h1.Escribir); t.Start(); }