Persisting a Font Object

  • Thread starter Thread starter David Pendleton
  • Start date Start date
D

David Pendleton

Hello all.

Does anyone know how to persist or serialize a Font object? Possible?

Thanks.
 
Yes, possible.
Use either the BinaryFormatter class to serialize the object into a byte
array.
You can then write the bytes to disk, or stream them out to wherever you
need them.
The BinaryFormatter will then be able to take the bytes and reconstitute
your font instance elsewhere.

-Rob Teixeira [MVP]
 
Thanks for the advice. I followed your advice and it worked well.

Now, my question is this: how do you persist (and restore) more than one
object per file?

Thanks again, your advice was very helpful.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top