J
Jules
I have a cutom object ex.:
public class Client
{
public string Name;
public string Id;
public Adresses Adresses;
public Client()
{
}
}
Client cl = new Client();
cl.Name = "xx";
cl.Adresses.add(adres);
....
Now I want a second client that is a copy of this first
client (not a reference to this first client, it must be
a stand alone copy, with no references to the first).
How I have to do that. Do I have to implement a Copy
method on the class Client? And also a copy on de Class
adresses (who is a collection).
Or are there other ways to simple copy the contents of an
object in an other object??
Jules
public class Client
{
public string Name;
public string Id;
public Adresses Adresses;
public Client()
{
}
}
Client cl = new Client();
cl.Name = "xx";
cl.Adresses.add(adres);
....
Now I want a second client that is a copy of this first
client (not a reference to this first client, it must be
a stand alone copy, with no references to the first).
How I have to do that. Do I have to implement a Copy
method on the class Client? And also a copy on de Class
adresses (who is a collection).
Or are there other ways to simple copy the contents of an
object in an other object??
Jules