Código:
Lo que les ruego el favor es si me ayudan con los errores, donde estan y cuales son y como los puedo acomodar, no tengo un compilador de C# y solo lo estoy haciendo por aprender.using System.Runtime.InteropServices; using System; namespace vector { class vectorApp { [DllImport ("kernel32.dll")] public static extern bool SetConsoleTextAttribute(IntPtr hConsoleOutput, int wAttributes); [DllImport ("kernel32.dll")] public static extern IntPtr GetStdHandle(uint nStdHandle); public struct nodo { int[] cedula; string[] nombre; string[] ape; } public static void Main() { ushort num=20; uint STD_OUTPUT_HANDLE=0xfffffff5; IntPtr hConsole=GetStdHandle(STD_OUTPUT_HANDLE); cedula=new int[num]; nombre=new string[num]; ape=new string[num]; for(int x=1;x<=num;x++) { Console.Write("# de cedula: {0}",x); cedula[x]=Console.ReadLine(); Console.Write("Digite nombre: {0}",x); nombre[x]=Console.ReadLine(); Console.Write("Digite apellido: {0}",x); ape[x]=Console.ReadLine(); } Console.WriteLine("Datos Introducidos"); string a=Console.ReadLine(); Console.WriteLine("Cedula Nombre Apellido"); Boolean b=true; for(int x=1;x<=num;x++) { if(b) { SetConsoleTextAttribute(hConsole, 15); Console.WriteLine("{0} {0} {0}",cedula[x],nombre[x],ape[x]); Console.WriteLine(); b=false; } else { SetConsoleTextAttribute(hConsole, 15); Console.WriteLine("{0} {0} {0}",cedula[x],nombre[x],ape[x]); Console.WriteLine(); b=true; } } a=Console.ReadLine(); } } }
Gracias Chao