Quote:
It wouldn't work like that given you would use an unsigned type (I know it's just an example, but still give a proper example)
In CO's case a int would work fine with the given example like this:
public int Money
{
get { return _money; }
set { value < 0? _money = 0: _money = value; }
}
Wow... that's what I get for typing things out in the middle of the night. I'm aware of that but just had a very blonde moment. Thanks for the corrections. Accuracy ftw!