so how can I serialize my object?
here some code about it..
[serializable]
public class MyClass
{
some properties..
one public delegate..
one public event...
}
public partial class Form1: Form
{
public Form1()
{
MyClass obMyClass = new MyClass();
obMyClass.eventName +=new MyClass.delegateName (newMethod); // if I coment this line everything is fine..
// but if not, when i try to serialize obMyClass, i get exception (Form1 not mark as serializable), so please if anyone can help me..
}
public void newMethod()
{ some code here..}
}
Amit ChoudharyPosted Mar 11, 2010, 2:38 AM
Check the signature and of delegate and methods and also event is declared properly with the Delegate..
Mark as answer if helps.