大家看看,我这个应该怎么分隔呀
 string[] d = ds.Tables[0].Rows[0]["question"].ToString().Split((new char[] { "\r\n" });
就是这个new char[] 不知道怎么设置,写成new string也不行。

解决方案 »

  1.   

    主要是想实现根据\r\n分隔得到一个数组,然后绑定到RadioButtonList上面。
      

  2.   

    ds.Tables[0].Rows[0]["question"].ToString().Split(new string[] { "\r\n" });或者:ds.Tables[0].Rows[0]["question"].ToString().Split(new char[] { ‘\r’,'\n’ });
      

  3.   

    "\r\n" 改为 Chr(13) + Chr(10)
      

  4.   

    麻烦再问下,你这个分隔方法完全正确,可是绑定到RadioButtonList上面,显示的项有空项,就是也绑定了\r\n,这个该怎么解决呢,我想去掉这个\r\n