Let's say I have 2 classes, Employee and State (reference the code below for further details), and I set the Employee.stateID, upon the setter being set, how can I get the StateName, i.e. State.stateName? Thank you in advance for any assistance!
----- Employee Class -----
public class Employee
{
private string _firstName;
private string _lastName;
private int _stateId;
... removed other code for brevity
public int StateId
{
get { return _stateId;}
set { _stateId= value; }
}
}
----- State Class -----
public class State
{
private int _stateId;
private string _stateName;
... removed other code for brevity
public int StateId
{
get { return _stateId;}
set { _stateId= value; }
}
public int StateName
{
get { return _stateName;}
set { _stateName= value; }
}
}
----- Employee Class -----
public class Employee
{
private string _firstName;
private string _lastName;
private int _stateId;
... removed other code for brevity
public int StateId
{
get { return _stateId;}
set { _stateId= value; }
}
}
----- State Class -----
public class State
{
private int _stateId;
private string _stateName;
... removed other code for brevity
public int StateId
{
get { return _stateId;}
set { _stateId= value; }
}
public int StateName
{
get { return _stateName;}
set { _stateName= value; }
}
}