关于comboBox的小问题 string temp = "1998,1999,2000,2001";如何把上面的字符串绑定到comboBox上,选项一为1998,选项二为1999,选项三为2000,选项四为2001 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 先split到一个数组中,然后以数组为数据源 try:string[] strs = temp.Split(",");foreach(string s in strs){ comboBox1.Items.Add(s);} 错误 1 与“string.Split(params char[])”最匹配的重载方法具有一些无效参数 D:\t\WindowsApplication2\WindowsApplication2\Form1.cs 23 29 WindowsApplication2错误 2 参数“1”: 无法从“string”转换为“char[]” D:\t\WindowsApplication2\WindowsApplication2\Form1.cs 23 40 WindowsApplication2 呵呵,其实这样就可以了string temp = "1998,1999,2000,2001";string[] arr = temp.Split(',');comboBox1.DataSource = arr; C#编程实现对SQL操作日志的查看 UNION ALL 判断是哪个表的信息 求sql语句 删除图片 项目间互相共享界面问题,比较复杂,请提供思路....在线等...解决问题立即结贴. 急问!!! C#中如何在main函数中实现单例模式 为什么我得datagrid无法显示??在线等!! 关于dataadapter能不能使用reader那种SequentialAccess方式呀 如何编写此程序?(c) 请问打包的时候,如何把ajax环境打进去呢? 怎样实现ComboBox的Tooltips?
foreach(string s in strs)
{
comboBox1.Items.Add(s);
}
string[] arr = temp.Split(',');
comboBox1.DataSource = arr;