C On Variable Change Property Get Set

[Solved] C On Variable Change Property Get Set | Vb - Code Explorer | yomemimo.com
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

Answers related to c on variable change property get set

Code Explorer Popular Question For Vb