|
-
Oct 2nd, 2006, 01:36 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] [2005] Error using BinaryFormatter
I am trying to serialize a class to a file using the BinaryFormatter. I keep getting this error:
"Type 'System.Windows.Forms.UserControl' in Assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable."
and I don't know why. The class makes no reference to any user control, or form. This class is a property of a user control, but I don't see why that would be an issue. The class is in its own project with no reference to System.Windows.Forms.
Does anyone have any idea why I would be getting this error?
I just found what is causing the errors. It's because of 2 custom events. How can I serialize the object and keep the events?
Last edited by mpdeglau; Oct 2nd, 2006 at 01:50 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|