Question : c# on variable change property get set
Answered by : alberto-vona
public int MyProperty
{ get { return _myProperty; } set { _myProperty = value; if (_myProperty == 1) { // DO SOMETHING HERE } }
}
private int _myProperty;
Source : https://stackoverflow.com/questions/5842339/how-to-trigger-event-when-a-variables-value-is-changed/5842370 | Last Update : Thu, 13 Jan 22