DataRow and DataTable

  • Thread starter Thread starter C# beginner
  • Start date Start date
C

C# beginner

Hi all,
I have a question regarding DataRows in DataTable.
My DataTable name is DtTag. I am filtering a row out of
the DataTable based on a column name called "TagName".
My question here is

DataRow[] Rows =
DtTag.Select("TagName = '" + tagName + "'");

How do I check the count of Rows array? How do I check if
there are any rows returned?
Thanks a lot for your help.
 
C# beginner said:
I have a question regarding DataRows in DataTable.
My DataTable name is DtTag. I am filtering a row out of
the DataTable based on a column name called "TagName".
My question here is

DataRow[] Rows =
DtTag.Select("TagName = '" + tagName + "'");

How do I check the count of Rows array? How do I check if
there are any rows returned?

Just use Rows.Length, as with any other array.
 
Back
Top