DataRow

J

Jim Heavey

If I am using c# and I have a DataRow and I know that I want the value for
a column named "Fred" - how can I access this column if I do not know it's
index? Must I loop through the columns collection to find the right index?

Thanks in advance for your assitance!!!!
 
M

Miha Markic

Hi Jim,

DataRow dr = ...
int value = dr["Fred"];

Wait. A column named Fred? ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top