C
colin
Hi,
I need to transfer data structures to/from a fixed file format,
some of the format is quite easy its just a binary store of
char/int/.../floats etc.
however some of the fields are stored as variable size arrays of structures
etc
and some individual fields are stored as comressed.
some of the structures are nested quite deep.
also some of the feilds are not stored the same way,
ie references to objects are stored via an index in a table.
whats the best way to do this in c# ?
ive worked out various ways I can do this,
such as a class type for each data item and code to write each field to the
file
in order but there are so many structures I realy need a way of specifyng
how each field is stored in the file.
ive been looking at the serialization functionality,
but im not too clear on this so far,
or if its going to be any easier to do.
being able to just set an attribute for each
member would be the most convenient way to do it
but ive only found the attribute to not serialize a member,
rather than the opposite wich would be handier
is there any custom attributes that can be used ?
Colin =^.^=
I need to transfer data structures to/from a fixed file format,
some of the format is quite easy its just a binary store of
char/int/.../floats etc.
however some of the fields are stored as variable size arrays of structures
etc
and some individual fields are stored as comressed.
some of the structures are nested quite deep.
also some of the feilds are not stored the same way,
ie references to objects are stored via an index in a table.
whats the best way to do this in c# ?
ive worked out various ways I can do this,
such as a class type for each data item and code to write each field to the
file
in order but there are so many structures I realy need a way of specifyng
how each field is stored in the file.
ive been looking at the serialization functionality,
but im not too clear on this so far,
or if its going to be any easier to do.
being able to just set an attribute for each
member would be the most convenient way to do it
but ive only found the attribute to not serialize a member,
rather than the opposite wich would be handier
is there any custom attributes that can be used ?
Colin =^.^=