Convert contents of DataGridView to List in C#

前端 未结 5 1359
再見小時候
再見小時候 2020-12-19 00:35

What is the best way to grab the contents of a DataGridView and place those values into a list in C#?

5条回答
  •  再見小時候
    2020-12-19 01:02

    If you bind your list using DataSource, you can convert back by with:

    List myClass = DataGridView.DataSource as List;
    

提交回复
热议问题