由于同名命名空间会被多个程序集使用,C#没有提供直接的方法(对象浏览器也不行)通过命名空间获得程序集位置,这样就不方便找到那些引用文件时什么。
那么可以在立即窗口,中断某个代码的时候,去查询类所在程序集和命名空间:
typeof(string).Namespace "System" typeof(string).Assembly.Location "C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll"