using System;
using System.Data;
using System.Data.SqlClient;
namespace _09_09
{
class Class_09_09
{
public static void Main(String[] args)
{
DataSet ds = new DataSet();
ds.ReadXml("StudentsAddress.xml");
ds.WriteXmlSchema("StudentsAddress.xsd");
foreach(DataTable t in ds.Tables)
{
Console.WriteLine("{0} 表", t.TableName);
foreach(DataColumn c in t.Columns)
{
Console.Write("\t{0}", c);
}
Console.WriteLine();
foreach(DataRow r in t.Rows)
{
for(int i = 0; i < t.Columns.Count; ++i)
Console.Write("\t{0}", r[i]);
Console.WriteLine();
}
}
foreach(DataRelation r in ds.Relations)
{
Console.WriteLine("关系 {0}: ", r);
Console.WriteLine("\tParentTable: {0}", r.ParentTable);
Console.WriteLine("\tParentColumn: {0}", r.ParentColumns[0]);
Console.WriteLine("\tChildTable: {0}", r.ChildTable);
Console.WriteLine("\tChildColumn: {0}", r.ChildColumns[0]);
}
}
}
}
--------------------------------------------------------
Console.WriteLine("\tParentColumn: {0}", r.ParentColumns[0]);
Console.WriteLine("\tChildColumn: {0}", r.ChildColumns[0]);
--------------------------------------------------------
ChildColumns[0]);
ParentColumns[0]);
这是什么意思??括号里的0代表哪一列。是什么意思