I'm getting a build error in the below code:
The error says "invalid expression term" and underlines the semi-colons. I've tried to Convert.ToString(dataRow.Field<0>);, dataRow.Field<0>.ToString();, etc.
If I replace the angle-brackets with standard brackets I get a different type of error. I've googled this but I'm not sure what I'm doing wrong.
I know the values to be returned will be strings, I know the DataTable connection works...but in any event it's not even building due to whatever's wrong with my syntax.
This is with VS2008. Thanks.
Code:
foreach (DataRow dataRow in dataTable.Rows)
{
string start = dataRow.Field<0>;
string pattern = dataRow.Field<1>;
}
The error says "invalid expression term" and underlines the semi-colons. I've tried to Convert.ToString(dataRow.Field<0>);, dataRow.Field<0>.ToString();, etc.
If I replace the angle-brackets with standard brackets I get a different type of error. I've googled this but I'm not sure what I'm doing wrong.
I know the values to be returned will be strings, I know the DataTable connection works...but in any event it's not even building due to whatever's wrong with my syntax.
This is with VS2008. Thanks.