DataTable dt = new DataTable();  //声明
     //添加字段
    dt.Columns.Add("title",typeof(string));
    dt.Columns.Add("url",typeof(string));
      //添加ROW
      DataRow newRow = dt.NewRow();
      newRow["title"] = (string)item["网站名"];
      newRow["url"] = (string)item["URL"];
      dt.Rows.Add(newRow);     private bool IsExist(int id1, int id2)
    {       
        rows = dtYxzt.Select("id1=" + id1 + " and id2=" + id2);
        if (rows.Length > 0)
            return true ;
        else
            return false;
    }
	posted on 2006-12-13 12:01 
曾科 阅读(311) 
评论(0)  编辑  收藏  所属分类: 
C#