i'm creating application in c# using visual studio. want create code when variable has value of 1 piece of code carried out. know can use if statement problem value changed in asynchronous process technically if statement ignored before value has changed.
is possible create event handler when variable value changes event triggered? if so, how can this?
it possible have misunderstood how if statement works! appreciated.
seems me want create property.
public int myproperty { { return _myproperty; } set { _myproperty = value; if (_myproperty == 1) { // here } } }
this allows run code time property value changes. raise event here, if wanted.
Comments
Post a Comment