views:

28

answers:

1

I can't find any references to there being a limit to the number of DataColumns I can add to a DataTable. The DataTable will not be generated from a SQL query, but rather synthesized from other data.

Thanks, Matthew

+2  A: 

The Method signatures for AddAt and RemoveAt and Item for the DataColumnCollection class all take Int32. This is the object that the DataTable Class uses to store the columns.

This means it can have 2,147,483,647 columns give or take 1 or 2 for good measure. :)

klabranche
Or until you run out of memory
Chuck Conway
Or until you get hit in the head for having a design where you have so many columns that you have to worry about the limit. lol
Max Schmeling
Great comments!!!! :)
klabranche

related questions