ITPUB论坛 » Web开发 » ASP.NET与AJAX » 取到listBox 所有选项?
新一届的微软MVP评选已经开始,欢迎各位推荐!
2008-7-3 19:24 smartpig
取到listBox 所有选项?

请问:在windows 应用程序中,用c#语言,怎么取到ListBox 中的所有选项?

2008-7-3 19:24 juanpeng
根据Items.Count来遍历所有Items[i]呗

2008-7-3 19:25 hanfeishu
foreach遍历,设置selected=false

2008-7-3 19:25 cyntha80
2楼的,为啥用foreach而不用for啊?

页: [1]
查看完整版本: 取到listBox 所有选项?


Powered by ITPUB论坛