how to detect variable change 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
}
}
}
}