G
Guest
I have a class, see below. what I want to do is to load the "person" object
to itself, what is the correct way to do?
public class person {
public string first_name = "";
public string last_name = "";
public string address = "";
public void loadme (person my_person) {
// (A) this works
this.first_name = ((person) my_person).first_name;
// (B) how to load the whole object to itself? this is not working.
this = my_person;
}
}
Help... please.
to itself, what is the correct way to do?
public class person {
public string first_name = "";
public string last_name = "";
public string address = "";
public void loadme (person my_person) {
// (A) this works
this.first_name = ((person) my_person).first_name;
// (B) how to load the whole object to itself? this is not working.
this = my_person;
}
}
Help... please.