如何使用ASP.NET C#获取数据集中的特定列数? [英] How to get particular column count in dataset using ASP.NET C#?
本文介绍了如何使用ASP.NET C#获取数据集中的特定列数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从数据集中获取特定列数(从列开始到结束列)
我尝试过:
我尝试了很多方法但没有得到解决方案
get the particular column count from data set(Starting column to Ending column)
What I have tried:
I have tried many ways but not get the solution
推荐答案
DataSet
将不包含列
数据集
将具有N个DataTables
,这取决于上下文和用法。
DataTable
将仅包含行
和列
。
DataSet
will not contain Columns
Dataset
will be be having N number ofDataTables
, that depends on the context and usage.
DataTable
will contain onlyRows
andColumns
.
int count = dataTableName.Columns.Count; // to get the column count of a table
这篇关于如何使用ASP.NET C#获取数据集中的特定列数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文