dateset添加一列

                        ds.Tables[0].Columns.Add("short_name", System.Type.GetType("System.String"));//直接为表创建一新列  

                        foreach (DataRow dr in ds.Tables[0].Rows)//将新列分别递归添加到对应的行中  
                        {

                            dr["short_name"] = "helloword";

                        }  

 

posted @ 2016-10-17 17:51  justqi  阅读(270)  评论(0编辑  收藏  举报