R
Reuben
Hi,
I've been trying to rewrite some code which can run as a single method so
that I can save its state - that way I can resume processing the data when I
start the program back up. The data isn't actually stored in an array, due to
memory issues, instead it's generated at runtime by an Enumerator (I used the
yield statement to generate it). The idea was that I could serialize the
Enumerator and save it, so I wouldn't have to regenerate the data. The
problem is that the generated Enumerator object isn't serializable, and
doesn't have any constructors (public or private), which means I can't
perform custom serialization, since I have no way of recreating the object. I
know that if this works, it would be of great use to many people.
Does anyone know how to serialize custom enumerators?
Please reply if you have any ideas at all - I'm really at a dead end.
I've been trying to rewrite some code which can run as a single method so
that I can save its state - that way I can resume processing the data when I
start the program back up. The data isn't actually stored in an array, due to
memory issues, instead it's generated at runtime by an Enumerator (I used the
yield statement to generate it). The idea was that I could serialize the
Enumerator and save it, so I wouldn't have to regenerate the data. The
problem is that the generated Enumerator object isn't serializable, and
doesn't have any constructors (public or private), which means I can't
perform custom serialization, since I have no way of recreating the object. I
know that if this works, it would be of great use to many people.
Does anyone know how to serialize custom enumerators?
Please reply if you have any ideas at all - I'm really at a dead end.