public static void Main()
DataTable PruebaUno = new DataTable();
DataTable PruebaDos = new DataTable();
PruebaUno.Columns.Add("Codigo");
PruebaUno.Columns.Add("Nombre");
PruebaUno.Rows.Add("001","Kevin");
PruebaUno.Rows.Add("002","Bray");
PruebaUno.Rows.Add("003","Cruz");
PruebaUno.Rows.Add("004","Rativa");
PruebaUno.Rows.Add("005","Copia");
PruebaDos.Columns.Add("Cod");
PruebaDos.Columns.Add("Nom");
PruebaDos.Rows.Add("01","Carlos");
PruebaDos.Rows.Add("02","Pedro");
PruebaDos.Rows.Add("03","Gomez");
PruebaDos.Rows.Add("04","Alfonso");
PruebaDos.Rows.Add("05","Gustavo");
Console.WriteLine("TABLA1");
String Datos= String.Concat(PruebaUno.Rows[0]["Codigo"].ToString()," ",PruebaUno.Rows[0]["Nombre"].ToString());
Console.WriteLine(Datos);
Console.WriteLine("\nTABLA2");
String DatosDos= String.Concat(PruebaDos.Rows[0]["Cod"].ToString()," ",PruebaDos.Rows[0]["Nom"].ToString());
Console.WriteLine(DatosDos);
DataSet DatSet = new DataSet();
DatSet.Tables.Add(PruebaUno);
DatSet.Tables.Add(PruebaDos);
Console.WriteLine("\nDataSet");
String DatosDatSet= String.Concat(DatSet.Tables[1].Rows[1]["Cod"].ToString()," ",DatSet.Tables[1].Rows[1]["Nom"].ToString());
Console.WriteLine(DatosDatSet);
Console.WriteLine("\nOBTENCION DATOS-Tabla1 'Ciclo For'");
for(int i = 0; i < PruebaUno.Rows.Count ; i++)
String Datosc= String.Concat(PruebaUno.Rows[i]["Codigo"].ToString()," ",PruebaUno.Rows[i]["Nombre"].ToString());
Console.WriteLine(Datosc);
Console.WriteLine("\nOBTENCION DATOS-Tabla2 'Ciclo foreach'");
foreach(DataRow row in PruebaDos.Rows)
String Datosf= String.Concat(row["Cod"].ToString()," ",row["Nom"].ToString());
Console.WriteLine(Datosf);