Modifying a property's properties?
Okay ppl, I have a class:
[code]
public class Character {
private Point _location;
public Point Location {
get { return _location; }
set { _location = value; }
}
public Character(Point location) {
_location = location;
}
}
[/code]
Now, how can I modify the properties of Location (Point.X for example)? If I try CharacterObj.Location.X = 1 I get a compile time error (Cannot modify the value of get Location because it is not a variable)
Is there any smooth way around this?

shimtannyRank #3,312 · 434 reputationPosted Oct 11, 2004, 8:49 AM EDT
Carlos SanchezRank #6,113 · 276 reputationPosted Oct 11, 2004, 8:58 AM EDT
victor.andree5 reputationPosted Oct 18, 2004, 12:10 PM EDT
bilnaadRank #2,169 · 655 reputationPosted Oct 18, 2004, 1:45 PM EDT
bilnaadRank #2,169 · 655 reputationPosted Oct 18, 2004, 3:56 PM EDT
MykonineRank #2,671 · 521 reputationPosted Oct 18, 2004, 6:39 PM EDT
victor.andree5 reputationPosted Oct 19, 2004, 4:57 AM EDT