I have some binary files that I'm reading into C#. The
files have a table format with column names that I can
read, but each file may have a different number of columns.
I am trying to write a generic file viewing form that will
open one of these files and display the contents in a
I have tried creating an ArrayList of ArrayLists of the
data and binding this to the datagrid, but the results
were amusing: I get columns titled IsReadOnly, SyncRoot,
IsSynchronized, etc. All properties of an ArrayList.
I know that if I could create ArrayLists of objects with
each object representing a row from my binary file, it
would display correctly, but unfortunately I don't know
the format of the binary file ahead of time.
I suppose I could do something fancy, like create a class
on the fly that corresponds to the format of the file,
then create an ArrayList of objects of this type, but it
seems to me that shouldn't be necessary.
Is there a simple way to do this?
Thanks in advance,