错误提示:需要使用new关键字创建实例
DataSet data1 = new DataSet();
DataTable table1 = new DataTable();
table1 = data1.Tables.Add( "student ");
DataColumn column1 = table1.Columns.Add( "studentno ",typeof(Int32));
column1.AllowDBNull = false;
column1.DefaultValue = 25;
table1.Columns.Add( "studentname ", typeof(String));
table1.Columns.Add( "studentmarks ", typeof(Double));
DataRow row1 = table1.NewRow();
row1[ "studentno "] = 12;
row1[ "studentname "] = "张三 ";
row1[ "studentmarks "] = 45;
table1.Rows.Add(row1);
this.textBox1.Text = data1.Tables[0].Rows[0][ "studentname "].ToString();
各位老大帮忙看看是什么原因
[解决办法]
你看看是哪行错,再改改代码就行了.
[解决办法]
你去掉一部分代码!!
调试一下!!