Hi,
I am having a problem with making a delegate non-serializable. Since, if a class is made serializable then all its members also become serializable. I am having a delegate as defined below. My requirement is to make this delegate non-serializable. But I am not able to find any proper attribute using which I can make this kind of delegate non-serializable.
[Serializable]
public class SerializableClass
{
public delegate void SampleEventDelegate (int Val);
}
I know if the delegate is of System.EventHandler type then it can be made non-serializable using [NonSerialized] attribute. But when I try same on a delegate as defined above, it does not works.
If anybody knows how to make such delegates non serializable, please let me know.
Thanks
Regards
Junaid