you can use property, for example:
class a
{
private bool _runflag;
public bool Runflag
{
get { return _runflag; }
set { _runflag= value; }
}
public functionA()
{
......
_runflag=false;
}
public a()
{ _runflag=ture;}
}
class b
{
private bool _runflag;
public bool Runflag
{
get { return _runflag; }
set { _runflag= value; }
}
public functionB()
{
......
_runflag=false;
}
public b()
{ _runflag=ture;}
}
a a_instance = new a();
b b_instance = new b();
//if you want to call functionA or functionB
a_instance.functionA();
b_instance.functionB();
//if you want to check the function run or not
a_instance.Runflag or b_instance.Runflag