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.
 

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

Similar Threads


Back
Top