Home All Groups Group Topic Archive Search About

probably a dumb question about serialization

Author
23 Feb 2006 10:46 PM
djc
I was just reading a chapter in a .net network programming book (which I am
real new to) about serialization.

I need some clarification.

1) Its only 'data' (like property values) of a class that get serialized,
correct?

1b) class methods are not serialized, correct? In other words you can NOT
just create your own new custom class including methods (essentially
functionality), serialize an instance of the class, send it over the network
to your server side program which then deserializes it and actually 'uses'
the classes functionality. I'm way off here right?

any input is appreciated.

Author
24 Feb 2006 7:45 AM
Vadym Stetsyak
Hello, djc!

d> I need some clarification.

d> 1) Its only 'data' (like property values) of a class that get
d> serialized, correct?

yes

d> 1b) class methods are not serialized, correct? In other words you can
d> NOT just create your own new custom class including methods (essentially
d> functionality), serialize an instance of the class, send it over the
d> network to your server side program which then deserializes it and
d> actually 'uses' the classes functionality. I'm way off here right?

IMO that can be possible. I mean that you can create an assembly on the fly, send it over network, and then instantiate custom class that it holds.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Author
24 Feb 2006 12:52 PM
djc
thank you. Interesting.

Show quote
"Vadym Stetsyak" <vady***@ukr.net> wrote in message
news:%23a2PWZROGHA.1460@TK2MSFTNGP10.phx.gbl...
> Hello, djc!
>
>  d> I need some clarification.
>
>  d> 1) Its only 'data' (like property values) of a class that get
>  d> serialized, correct?
>
> yes
>
>  d> 1b) class methods are not serialized, correct? In other words you can
>  d> NOT just create your own new custom class including methods
(essentially
>  d> functionality), serialize an instance of the class, send it over the
>  d> network to your server side program which then deserializes it and
>  d> actually 'uses' the classes functionality. I'm way off here right?
>
> IMO that can be possible. I mean that you can create an assembly on the
fly, send it over network, and then instantiate custom class that it holds.
Show quote
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.blogspot.com

AddThis Social Bookmark Button