G
GiJeet
Hi, I have a datatable with your typical ID column and a notes
column. I'm trying to get the notes for a specific id passed to my
method.
Lanquage: C#
datatable is dtConfig
iID is passed into the method
Here is my (non-working
) linq code:
var sNotes = (from row in dtConfig.AsEnumerable()
where row.Field<int>("ID") == iID
select row.Field<String>("Notes"));
What am I doing wrong?
PS: I'd like to return a string rather then a var if possible, ie:
string sNotes = ....
Thanks.
G
column. I'm trying to get the notes for a specific id passed to my
method.
Lanquage: C#
datatable is dtConfig
iID is passed into the method
Here is my (non-working
![Smile :) :)](/styles/default/custom/smilies/smile.gif)
var sNotes = (from row in dtConfig.AsEnumerable()
where row.Field<int>("ID") == iID
select row.Field<String>("Notes"));
What am I doing wrong?
PS: I'd like to return a string rather then a var if possible, ie:
string sNotes = ....
Thanks.
G