[Reserved] C # Gets the number of rows by Rows.Count property

During operation Datatable data variables in C # in, sometimes we need to know whether the DataTable containing data or number of rows in the DataTable rows of data, then we can get the first DataTable objects in the Rows property, the property of an object by Rows count property to obtain the number of rows.

For example, we we have a DataTable variable dataDt, need to get the C # DataTable by total number of rows can use the following statement:

int rowCount = dataDt.Rows.Count;

 

Note: The text reproduced from personal bloggers station IT technology small fun house , the original link for the C # Gets total number of rows _IT technology by small fun house Rows.Count property .

Bloggers personal technology exchange group: 960 640 092, blogger micro-channel public numbers are as follows:

Guess you like

Origin www.cnblogs.com/xu-yi/p/11246380.html