First of all, apologies for the poor title of the question - I'm not quite sure that I am asking the right thing.
I can usually do the following to access the field:
MyTables table = dc.MyTables.SingleOrDefault(p => p.id == someId); somevalue = table.samplefield;
In this case, the variable somevalue will have the value of the field of the field field.
Now I have a scenario where I want to populate a variable, but I do not know the table field name at design time. However, I have this field name in the string. So you can get the value using this line?
Hoping this makes sense!
c # linq
Martin
source share