Do calculation on property getter and setter - CSharp Custom Type

CSharp examples for Custom Type:Property

Description

Do calculation on property getter and setter


class MyNumber
{
    int Nbr;

    public int value
    {
       get
       {
           return (Nbr / 100);
       }
       set
       {
           Nbr = value * 100;
       }
    }
}

Related Tutorials