public class db { public db() { } /// <summary> /// method returns a dataset object filled with data /// </summary> public static dataset getdataset() { //创建dataset和datatable dataset ds = new dataset(); datatable table = new datatable("records"); datacolumn col; //增加一个列 col = new datacolumn(); col.datatype = system.type.gettype("system.int32"); col.columnname = "id"; col.readonly = true; col.unique = true; table.columns.add(col);