detect value change of a variable c# code example
Example: c# detect variable change
public class MyClass
{
private var myVar;
public var MyVar
{
get
{
return myVar;
}
set
{
if(myVar != value)
{
myVar = value;
// Do something
}
}
}
}