TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
steven
NA
24
41.9k
.Net Remoting, I have to use marshal by reference in this case?
Oct 6 2011 11:58 PM
//remotable object
[Serializable]
public class MBV
{
public int Data
{
get;
set;
}
}
public class MBR : MarshalByRefObject
{
public int Data
{
get;
set;
}
}
//server side
//ellipsis
//client side
//create channel/object etc...
MyObject obj = (MyObject)Activator.GetObject(typeof(MyObject), "tcp://localhost:2222/myObj");
obj.Mbv = new MBV();
obj.Mbv.Data = 1112; //It seems no effect of this statement for marshalByValueObject.
Console.WriteLine(obj.Mbv.Data);
obj.Mbr = new MBR();
obj.Mbr.Data = 1112;
Console.WriteLine(obj.Mbr.Data);
//OUTPUT,
0
1112
How can i change the data of marshalByValueObject? I have to use marshal by reference in this case?
Reply
Answers (
2
)
CUSTOM POSITION FIELD OF CRYSTAL REPORT USING C#
Webfarm and Webgarden in ASP.NET