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?
victor.andreePosted Oct 19, 2004, 8:57 AM
MykoninePosted Oct 18, 2004, 10:39 PM
bilnaadPosted Oct 18, 2004, 7:56 PM
bilnaadPosted Oct 18, 2004, 5:45 PM
victor.andreePosted Oct 18, 2004, 4:10 PM
Carlos SanchezPosted Oct 11, 2004, 12:58 PM
shimtannyPosted Oct 11, 2004, 12:49 PM