If the property name is known at compile time, cast the
ExpandoObject
to
dyanmic
, and access the property directly:
var getlist = grdfeatchobjlist.Select((dynamic x) => x.batchId == Txtbatchcode.Text);
For a dynamic property name which isn't known until runtime, cast the
ExpandoObject
to an
IDictionary<string, object>
, and use the indexer:
var getlist = grdfeatchobjlist.Select((IDictionary<string, object> x) => x["batchId"] == Txtbatchcode.Text);