Cast ListView Items to List?

后端 未结 4 822
[愿得一人]
[愿得一人] 2021-02-13 11:02

How can I cast ListView.Items to a List?

This is what I tried:

List list = lvFiles.Items.Cast

        
4条回答
  •  广开言路
    2021-02-13 11:12

    Try something like this

    List list = lvFiles.Items.Cast().Select(x=> x.ToString()).ToList();
    

提交回复
热议问题