Hi all,
i have a table like below
| FieldName | FieldValue |
| Id | 1 |
| Name | John |
| Id | 2 |
| Name | Andrew |
i have a static value name called "John"
need to filter name as john dynamically in linq c# ,how can i achieve this
| FieldName | FieldValue |
| Id | 1 |
| Name | John |
| Id | 2 |
| Name | Andrew |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suraj DubeyPosted Mar 25, 2021, 6:29 AM
var filter = testTable.AsEnumerable().Where(x => x.Field<string>("Name") == "John");