|
发表于 2020-1-3 15:27:01
|
显示全部楼层
可以设置一个全局变量。A调用C的时候把变量赋值 A,B调用C的时候把变量赋值B
比如class FromA()
{
public string strparent = ""
private void 调用C()
{
strparent = "A";
//u can call form c here;
}
}
class FromB()
{
private void 调用C()
{
FormA.strparent = "B";
//u can call form c here;
}
}
你读FormA.strparent的值就知道谁调用的了。 |
|