I have an object of type System.Data.EnumerableRowCollection<System.Data.DataRow> which doesn’t have any items in it. How can I get the number of columns in it?
I can use the IDE to dig through the properties to get the count but I don’t know how to get this via code. In the image you can see the source table has 2 columns.

You can’t, as far as I’m aware.
The fact that an
EnumerableRowCollectionis backed by aDataTableis an implementation detail. It’s logically just a sequence ofDataRows, and an empty sequence logically doesn’t have a number of columns.If you need this information, it sounds like you ought to be retaining a reference to the source
DataTableyourself.