Here is what I have already :
public class Human
{
[Mode(MaxValue = 1000)]
public Var MoneyInPocket = new Var();
[Mode(MaxValue = 75)]
public Var Age= new Var();
}
In my method :
Human Eric = new Human();
Eric.MoneyInPocket = 50; //OK!
Eric.Age= 200; // It's automatically changed to 75. So it's okay too!
Everything works fine other than I can't change MaxValue
at run-time.
I don't want to put MaxValue as part of Human
or Var
classes and also I don't want to have a second class to store my variables other than class Var
.