LINQ: Select a column value based on another column value

I want to fetch a column value from dt based on the adjacent column value
Also, want to check NULL activity in that.
e.g.,

DT:

Class | Count
1 | 10
2 | 20
3 | 30
4 | 40

I want to extract the value of count from class 3 in a string not DR.

Any Linq solutions?

@Ayush_Purohit_IN

dt.Select(“[Class]=3”)(0).Item(“Count”).ToString

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.