简体   繁体   中英

Is there a limit to the number of rows that can be added to a DataTable in c#?

I am fetching data from excel file, decoding the SAML requests and then storing the decoded requests in a DataTable - all done in C#.

The problem is that when I count the number of rows that have been added to the DataTable using this code:

int totalRows = table.Rows.Count; 

The output is not the same as the number of rows in the actual excel file. I was just wondering if there is a limit to the number of rows that can be added from excel file to a DataTable?

The maximum number of rows that a DataTable can store is 16,777,216.

You can find more information on MSDN: DataTable Class

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM