查找调用函数C#的代码的DLL名称

时间:2016-09-27 10:07:58

标签: c# dll reflection

在我们所有项目中包含的框架库中,我们有一个Log函数。

在框架中

public static class Log
{
   GenericLog(string msg){ string caller = GETDLLNAME //implementation}
   GenericError(string msg){ string caller = GETDLLNAME //implementation}
}

在其他代码中

using Framework;

public class foo
{
    public string GenerateBar()
    {
         Log.GenericLog("FooBar");
    }
}

有没有办法确定调用Log.GenericLog的DLL的名称?

1 个答案:

答案 0 :(得分:0)