-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: SitaramanM
Message 4 in Discussion
Hi Whenever you need ur objects to be accessed cross-process(in-fact even
cross-appdomain), then there are two ways of doing it. either u send a copy of ur
object from process x to process y or u send the reference of the object from
process x to process y This can be done by either making the object Serializable(by
value ) or by inheriting the MarshalByRefObject(by ref). In your case i believe that
you cannot use MarshalByRef as it is inheriting from some other class which does NOT
inherit from MarshalByRefObject. Also based on your requirement it is better to pass
a copy of the object from the remote process to ur winclient. So Use Serialization
You can make your object Serializable in two ways. a) Use Default Serialization :
Decotrate your class with Serializable Attribute as follows Original Class Public
Class TestSimpleObject '(VB.Net) public class TestSimpleObject
{ '(C#) Modify to <Serializable()> Public Class TestSimpleObject
'(VB.Net) [Serializable()]
public class TestSimpleObject { '(C#) This will make your class
as serializable and you can then pass the objects across processes b) Use Custom
Serialization : If you are the more adventrous type, then you can use custom
Serialization by implementing the ISerializable interface and overriding the necessary
methods(GetObject Data and the overloaded constructor). This will allow you to control
the Serialization process hth regards, sr
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]