probably a dumb question about serialization

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.
 
V

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
 
D

djc

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top