+ -
当前位置:首页 → 问答吧 → split分割问题

split分割问题

时间:2011-12-28

来源:互联网

for (int n = 0; n < ds3.Tables[0].Rows.Count; n++)
  {
  string courseid = ds3.Tables[0].Rows[n]["TeacherID"].ToString();
  string tea = courseid.Split(",");
  teacher = tea;
  }

就出错了错误 2 与“string.Split(params char[])”最匹配的重载方法具有一些无效参数 F:\wangyanjing\School_OA_Web\School_OA_Web\EducationalManagement\ExamSchedule.aspx.cs 111 34 School_OA_Web

错误 3 参数“1”: 无法从“string”转换为“char[]” F:\wangyanjing\School_OA_Web\School_OA_Web\EducationalManagement\ExamSchedule.aspx.cs 111 49 School_OA_Web
这是怎么回事啊?怎么改啊

作者: hym51   发布时间: 2011-12-28

string[] tea = courseid.Split(',');
 

作者: q107770540   发布时间: 2011-12-28

用什么开发环境。。?

作者: pengyi_205   发布时间: 2011-12-28

引用 1 楼 q107770540 的回复:

string[] tea = courseid.Split(',');

作者: jimyboy   发布时间: 2011-12-28

for (int n = 0; n < ds3.Tables[0].Rows.Count; n++)
  {
  string courseid = ds3.Tables[0].Rows[n]["TeacherID"].ToString();
  string tea = courseid.Split(',');
  teacher = tea;
  }

作者: HJ850126   发布时间: 2011-12-28

热门下载

更多