使用环境:win2003+vs2003+.net framework sp1
msdn中说,ListView 存在SelectedIndexCollection class,
可以使用

人性的弱点:思维惯性ListView.SelectedIndexCollection indexes = 
人性的弱点:思维惯性        
this.ListView1.SelectedIndices;


来调用的,但是在Vs2003中,输入ListView.后,没有SelectedIndexCollection提示;
如果System.Windows.Forms.ListView.SelectedIndexCollection a = listView1.SelectedIndices;是可以通过编译的,只是Vs2003不提示有SelectedIndexCollection这个类的。
使用Reflector查看ListView,存在SelectedIndexCollection Class,定义如下:

人性的弱点:思维惯性public class SelectedIndexCollection : IList, ICollection, IEnumerable

 
说明:关于类中子类的调用,是使用类名称调用的,同调用类中静态方法相似。所以使用

人性的弱点:思维惯性System.Windows.Forms.ListView.SelectedIndexCollection a = listView1.SelectedIndices


只是Vs2003中文版中存在Bug,不提示SelectedIndexCollection存在,对于像我这样用Vs2003,喜欢其提示的人来说,谨防思维惯性,过于相信Microsoft。
凡事要动手验证,只靠思考存在误区,须知“纸上得来终觉浅,绝知此事要躬行”。
看来,使用基于文本的编辑器,手工编译源码还是有好处的。人性的弱点:思维惯性

相关文章: