7
Answers

Modifying a property's properties?

victor.andree

victor.andree

20y
1.8k
1
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?
Answers (7)