C#中怎么清空listview中的数据

时间:2026-02-15 19:26:48

1、运行项目,如图所示

C#中怎么清空listview中的数据

2、点击清空Listview第一行数据按钮,如图所示:

C#中怎么清空listview中的数据

3、点击清空Listview所有数据按钮,如图所示:

C#中怎么清空listview中的数据

4、代码如图所示:

1、 ListView1.Items.Clear();

2、 ListView1.Items.RemoveAt(0) ;

C#中怎么清空listview中的数据

© 2026 五度知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com