Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Updated 12-Apr-16 23:03pm
v2
Comments
an0ther1 13-Apr-16 1:50am    
Sorry Raja but you haven't provided enough information though I would suggest you are trying to find how many rows have a specific value in one column.
If so you need to look at DataTable.Select(filterstring)
Take a look at; https://msdn.microsoft.com/en-us/library/system.data.datatable.select(v=vs.110).aspx

If this is not what you need improve your question - do not add another, edit this one

Kind Regards
Sinisa Hajnal 13-Apr-16 2:35am    
What are you trying to do?

1 solution

DataSet will not contain Columns
Dataset will be be having N number of DataTables, that depends on the context and usage.
DataTable will contain only Rows and Columns.
C#
int count = dataTableName.Columns.Count; // to get the column count of a table 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900