关于创建虚拟表的小心得

 DataTable dt = new DataTable("MyTable");

            DataRow dw = dt.NewRow();

            DataColumn dc = new DataColumn();

            dc.ColumnName = "make";

            dt.Columns.Add(dc);

            dw["make"] = "jodan";

            dt.Rows.Add(dw);

            foreach (DataRow row in dt.Rows)

            {

                Response.Write(row["make"]);

            }

你可能感兴趣的:(创建)