Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# on variable change property get set

public int MyProperty
{
    get { return _myProperty; }
    set
    {
        _myProperty = value;
        if (_myProperty == 1)
        {
            // DO SOMETHING HERE
        }
    }
}

private int _myProperty;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #variable #change #property #set
ADD COMMENT
Topic
Name
9+2 =