473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to serialize object and methods?

I have long term question about object serialization.
Object serialization is used in many ways.
In .net I heard XML is used for object serialization. I understand how
object values are serialized and read many books about it.

But, I don't understand how those methods are serialized?
Are instance methods serialized? I think it does so, remoting object method
call is possible.
If so how the method is serialized? Instance values are just data. But
method is sequential steps for execution. How this is serialized and
delivered to other computer?

I want to know how the methods are serialized and de-serialized, and how the
actual performance work?

Thank you..
Nov 16 '05 #1
3 5912
What do you envisage happening when a method is serialized?

Only state (data) is serialized, the methods are part of the type definition and so are availble within the assembly. Its the state which is transient unless serialized. I suppose you could argue that the methods are permanently serialized in the form of the assembly byte stream (I known I am ignoring transient assemblies created via Reflection.Emit before anyone picks me up on it)

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<ut**************@TK2MSFTNGP12.phx.gbl>

I have long term question about object serialization.
Object serialization is used in many ways.
In .net I heard XML is used for object serialization. I understand how
object values are serialized and read many books about it.

But, I don't understand how those methods are serialized?
Are instance methods serialized? I think it does so, remoting object method
call is possible.
If so how the method is serialized? Instance values are just data. But
method is sequential steps for execution. How this is serialized and
delivered to other computer?

I want to know how the methods are serialized and de-serialized, and how the
actual performance work?

Thank you..

[microsoft.public.dotnet.languages.csharp]
Nov 16 '05 #2
Thank you for the comment.
You means the methods (including instance and static) are never serialized.
Then my question should turn to this question.
Using web service or remoting API, the remote method is visible from remote
environment.
How the remoting call to remote object works?
"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:ec**************@TK2MSFTNGP14.phx.gbl...
What do you envisage happening when a method is serialized?

Only state (data) is serialized, the methods are part of the type definition and so are availble within the assembly. Its the state which is
transient unless serialized. I suppose you could argue that the methods are
permanently serialized in the form of the assembly byte stream (I known I am
ignoring transient assemblies created via Reflection.Emit before anyone
picks me up on it)
Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<ut**************@TK2MSFTNGP12.phx.gbl>
I have long term question about object serialization.
Object serialization is used in many ways.
In .net I heard XML is used for object serialization. I understand how
object values are serialized and read many books about it.

But, I don't understand how those methods are serialized?
Are instance methods serialized? I think it does so, remoting object method call is possible.
If so how the method is serialized? Instance values are just data. But
method is sequential steps for execution. How this is serialized and
delivered to other computer?

I want to know how the methods are serialized and de-serialized, and how the actual performance work?

Thank you..

[microsoft.public.dotnet.languages.csharp]

Nov 16 '05 #3
What happens is not the *method* getting serialized but the *method call*. In other words what gets sent across the wire is (in some form) the name of the type, the name of the method and the parameters. SO the type, the methos and the opparameters get bundled up into a serialized package and setn across the wire. At the other end they are unbundled and the type and method indentified thenthe call stack is recreated froim the serializd parameters and the remote type invoked.

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<u2*************@tk2msftngp13.phx.gbl>

Thank you for the comment.
You means the methods (including instance and static) are never serialized.
Then my question should turn to this question.
Using web service or remoting API, the remote method is visible from remote
environment.
How the remoting call to remote object works?
"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:ec**************@TK2MSFTNGP14.phx.gbl...
What do you envisage happening when a method is serialized?

Only state (data) is serialized, the methods are part of the type definition and so are availble within the assembly. Its the state which is
transient unless serialized. I suppose you could argue that the methods are
permanently serialized in the form of the assembly byte stream (I known I am
ignoring transient assemblies created via Reflection.Emit before anyone
picks me up on it)
Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<ut**************@TK2MSFTNGP12.phx.gbl>
I have long term question about object serialization.
Object serialization is used in many ways.
In .net I heard XML is used for object serialization. I understand how
object values are serialized and read many books about it.

But, I don't understand how those methods are serialized?
Are instance methods serialized? I think it does so, remoting object method call is possible.
If so how the method is serialized? Instance values are just data. But
method is sequential steps for execution. How this is serialized and
delivered to other computer?

I want to know how the methods are serialized and de-serialized, and how the actual performance work?

Thank you..

[microsoft.public.dotnet.languages.csharp]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004

[microsoft.public.dotnet.languages.csharp]
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
5805
by: Ian Tompsett | last post by:
H I was wondering if it possible for an object to serialize/deserialize itself from XML. I'd be guessing that it would need to use the XmlSerializer class, but that seems to want to create a...
4
24836
by: Mudit | last post by:
Hi, I am new to XML Serialization. I am interested in serializing my object to Xml. I only have to serialize and I needn't worry about deserialization. As per my understanding, only the...
7
6523
by: Lars-Erik Aabech | last post by:
Hi! I've got problems with serializing my collections of business objects. The objects themselves serialize fine, but the collections fail. I've got the following structure: Base collection...
14
14260
by: vince | last post by:
Can I add (append) to an xml file that already contains a serialized object, and be able to deserialize to either or both objects from the same file...??? How is this done...?? thanks, vince
5
24657
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream...
3
7546
by: Toxick | last post by:
Hello experts, I'm a total C# noob with a total C# noob question. I've been Serializing in C++ (MFC) and writing data to std::fstreams for quite some time, so maybe I'm not understanding...
3
3239
by: Gislain | last post by:
Hello, I'm looking for a best way to serialize multiple / different object in the same XML file, and of course, how can i deserialize it. Actualy, when i serialize the first object in XML...
7
3519
by: Ben Amada | last post by:
I've created a class that I need to store in ViewState. However when I try to store it in ViewState, I get the following error: "The type 'solution.pe2' must be marked as Serializable or have a...
3
15158
by: Mirek Endys | last post by:
What is the best way to serialize object, that contains data in interfaces. Simple. I have instance of my object, that contains data in interfaces. What is the best way to XMLSerialize and...
4
7075
by: =?Utf-8?B?Qnlyb24=?= | last post by:
When I try to serialize an instance of the LocationCell below (note Building field) I get an error in the reflection attempt. If I remove the _Building field it serializes fine. I tried renaming...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.