I have a property like:
private Decimal _payout; public Decimal PayoutValue { get { return _payout; } set { _payout = value;
As you can see, this depends on the value of PayoutType , which is simply the simplest property of enum:
public CutType PayoutType { get; set; }
My problem is that PayoutType doesn't seem to set before PayoutValue , so the condition below will never be true. How to force the PayoutType parameter before PayoutType is evaluated?
Thanks.
UPDATE Thank you for your answers. I probably should have mentioned that most of the time this object is connected via DataContexts or with Http.Post from my client side (MVC project), so I have no constructors. Is there any other way, or do I need to start creatively with my programming?
source share