probably a dumb question about serialization

  • Thread starter Thread starter djc
  • Start date Start date
D

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.
 
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
 
thank you. Interesting.

Vadym Stetsyak said:
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.
 
Back
Top