If I have an Arraylist(which is marked as serailizable) which contains
objects derived from MarshalByRefObj ect something like below
public class MyArray
{
private ArrayList m_al;
public void MyArray()
{
m_al.Add(MyObje ct("XXX"));
m_al.Add(MyObje ct("YYY"));
m_al.Add(MyObje ct("ZZZ"));
}
public ArrayList AL{get{return m_al;}}
}
public class MyObject:Marsha lByRefObject
{
private string m_Data;
public MyObject(string sData)
{
m_Data = sData;
}
public string Data{get{return m_Data;}}
}
When I do the following on the client:
ArrayList alRemotedArrayL ist = <Get ArrayList from server Via Remoting>
foreach(MyObjec t obj in alRemotedArrayL ist)
{
Console.WriteLi ne(obj.Data);
}
Am I correct in thinking that for each call of 'obj.Data' I am making a
call to the server. And that alRemotedObject s is a collection of
Proxies pointing to the object on the server???
Thanks,
Nick
objects derived from MarshalByRefObj ect something like below
public class MyArray
{
private ArrayList m_al;
public void MyArray()
{
m_al.Add(MyObje ct("XXX"));
m_al.Add(MyObje ct("YYY"));
m_al.Add(MyObje ct("ZZZ"));
}
public ArrayList AL{get{return m_al;}}
}
public class MyObject:Marsha lByRefObject
{
private string m_Data;
public MyObject(string sData)
{
m_Data = sData;
}
public string Data{get{return m_Data;}}
}
When I do the following on the client:
ArrayList alRemotedArrayL ist = <Get ArrayList from server Via Remoting>
foreach(MyObjec t obj in alRemotedArrayL ist)
{
Console.WriteLi ne(obj.Data);
}
Am I correct in thinking that for each call of 'obj.Data' I am making a
call to the server. And that alRemotedObject s is a collection of
Proxies pointing to the object on the server???
Thanks,
Nick
Comment