Hi Team,
I have concern that what is the Difference between RowCount and Rows.Count?
both gives the same result (Dt total row count)
Hi Team,
I have concern that what is the Difference between RowCount and Rows.Count?
both gives the same result (Dt total row count)
Both works same and gives the output as rows count of a datatable.
→ RowCount : RowCount is a property that belongs to a DataTable variable. It returns the total number of rows present in the DataTable. This property is used when you want to know how many rows are there in a specific DataTable.
→ Rows.Count : Rows is a collection property of a DataTable variable that represents the entire collection of DataRow objects within that DataTable. Rows.Count specifically gives you the count of the rows in the DataRow collection of the DataTable.
Hope it helps!!
In UiPath, DataTable.Rows.Count and DataTable.Rows.Count both refer to properties related to the number of rows in a DataTable, but they come from different namespaces and have different underlying implementations:
DataTable.Rows.Count:System.Data.DataTable class in the .NET Framework’s System.Data namespace.Example:
dataTable.Rows.Count
DataTable.Rows.Count:Example:
dataTable.Rows.Count
In summary, both DataTable.Rows.Count and DataTable.Rows.Count serve the same purpose of providing the count of rows in a DataTable, but the former is used in .NET development contexts, while the latter is used within UiPath workflows.
Thanks,
Ashok ![]()
hello @Sanket_Shinde1
RowCount : RowCount is a property of the DataTable object itself. It returns the number of rows in the DataTable. It is primarily used when you’re directly interacting with a DataTable variable.
Rows.Count : Rows is a collection of DataRow objects within the DataTable. Rows.Count is a property of this collection, returning the number of DataRow objects in the collection.
And Also
RowCount is accessed directly from the DataTable object itself.Rows.Count is accessed from the collection of DataRow objects within the DataTable.Regards,
Dheerandra Vishwakarma
RowCount is an extension which was introduced at a later stage by UiPath
![]()
UPD1:
DataTable.Rows.Count is a Property:
Both will give the same value, but RowCount is maybe not available (depending on package versions)
Thank you so much All , I really appreciate your valuable answers.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.