新手请教:用c#怎么写成类呢? class BindData { string strCon = "provider = microsoft.ace.oledb.12.0;data source = pl.accdb"; string strCom = "select xh as 序号,qh as 开奖期号,w as 第一位, q as 第二位, b as 第三位, s as 第四位, g as 第五位 from pl order by xh"; DataSet plDataSet = null; //建立数据源,相当于存储数据的容器 string plDataSet = new DataSet(); OleDbConnection plConn = new OleDbConnection(); //连接数据库的工具 string plConn.ConnectionString = strCon; plConn.Open(); //通过OleDbDataAdapter对象得到一个数据集 OleDbDataAdapter plCommand = new OleDbDataAdapter(strCom, plConn); plCommand.Fill(plDataSet, "pl"); //把Dataset绑定books数据表