【问题标题】:Is there a limit to the number of rows that can be added to a DataTable in c#?在 c# 中可以添加到 DataTable 的行数是否有限制?
【发布时间】:2016-01-01 18:57:10
【问题描述】:

我正在从 excel 文件中获取数据,解码 SAML 请求,然后将解码后的请求存储在 DataTable 中 - 所有这些都在 C# 中完成。

问题是,当我使用此代码计算已添加到 DataTable 的行数时:

int totalRows = table.Rows.Count; 

输出与实际excel文件中的行数不一样。我只是想知道可以从excel文件添加到DataTable的行数是否有限制?

【问题讨论】:

    标签: c# datatable


    【解决方案1】:

    DataTable 可以存储的最大行数为 16,777,216。

    您可以在 MSDN 上找到更多信息:DataTable Class

    【讨论】:

    • 谢谢你的回答:)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-12-27
    • 2011-01-14
    • 2015-03-25
    • 2020-02-18
    • 2020-11-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多