class called
{
public static function test()
{
//get caller here
// how to get the caller instance object???
}
}
class caller
{
new()
{
called.test();
}
}
...全文
1806打赏收藏
.NET中如何获取得function的caller(即在被调用过程里取得调用方的实例对象)
class called { public static function test() { //get caller here // how to get the caller instance object??? } } class caller { new() { called.test(); } }