R
Rene
I created a class (SomeClass), on that class, I declared a delegate (OnXyz)
and then declared an event based on that delegate (Xyz). All this in the
same class. After that, I created another class where I instantiate my
previous class (SomeClass) and attach to its event like this:
someObject. Xyz += new SomeClass. OnXyz (PrivateFunction);
Life is good when I serialize the object but things go to hell when I
deserialize it. What a hell? If I make the "PrivateFunction" a pulic
function everything appears to work fine. So what's this C# fetish about
having to have public methods on delegates? Why does serializing works but
not the opposite?
Thanks.
and then declared an event based on that delegate (Xyz). All this in the
same class. After that, I created another class where I instantiate my
previous class (SomeClass) and attach to its event like this:
someObject. Xyz += new SomeClass. OnXyz (PrivateFunction);
Life is good when I serialize the object but things go to hell when I
deserialize it. What a hell? If I make the "PrivateFunction" a pulic
function everything appears to work fine. So what's this C# fetish about
having to have public methods on delegates? Why does serializing works but
not the opposite?
Thanks.