M
Michael Gorbach
Hi,
My project is set up with 1 main form and 2 sub forms declared inside
it. Inside the main form i have declared a simulation object (class i
wrote), which is passed in as a parameter to constructors of the 2
subforms.
I am trying to issue a command from the mainform to serialize the
simulation object and save it to a file, using a binaryformatter. For
some reason, im getting a serializationexception which says that both
the main form and the sub forms must all be marked [serializable]. Why
do they need to be marked so when there are no fields of the MainForm
or ViewForm class declared in the simulation object?
My project is set up with 1 main form and 2 sub forms declared inside
it. Inside the main form i have declared a simulation object (class i
wrote), which is passed in as a parameter to constructors of the 2
subforms.
I am trying to issue a command from the mainform to serialize the
simulation object and save it to a file, using a binaryformatter. For
some reason, im getting a serializationexception which says that both
the main form and the sub forms must all be marked [serializable]. Why
do they need to be marked so when there are no fields of the MainForm
or ViewForm class declared in the simulation object?