How to make C# DataTable filter

后端 未结 6 1470
暗喜
暗喜 2020-12-03 14:31

my datatable;

    dtData

    ID | ID2
    --------
    1  |  2
    1  |  3


dtData.Select(\"ID = 1\"); one more rows;

i want row \"ID = 1

6条回答
  •  感动是毒
    2020-12-03 15:05

    Great example and very helpful. Wanted to add one thing - if you need to select on a string use something like:

    DataTable dt2 = dt.Select("state = 'FL' "); 
    

提交回复
热议问题