View Single Post
Old 06-16-2004, 01:54 PM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
assign a value to 'this'

can you tell it's a java day for me? =)

i have a class called 'agent'

check out this code:
Code:
public agent(int agentID){
  agent a = AgentUtility.getAgentByID(agentID);
  this = a;
}
this code won't work because i can't assign a value to 'this' .. is there any way i can do this without having to go through each of 'this' properties and assign the value of 'a' properties?
__________________
Mike
sde is offline   Reply With Quote