
28/03/2005, 09:52
|
| | Fecha de Ingreso: octubre-2004 Ubicación: COLOMBIA
Mensajes: 240
Antigüedad: 20 años, 4 meses Puntos: 3 | |
Sigo con C# Hola chicos de ForosdelWeb, gracias a RootK por haberme ayudado con lo de los colores y quisiera plantearos lo que he hecho y me digan que errores tiene por que como ya dije antes yo no puedo compilar.
Código:
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();
}
}
}
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.
Gracias Chao |