这也不行???DataSet ds; while(某个条件){ds=......;}某控件.DataSource=ds;//竟然提示我使用了为赋值的局部变量???不能这样写吗???看来半年多的程序白学了[解决办法]DataSet ds = new DataSet();