开发者

Tool to get full qualified type name

开发者 https://www.devze.com 2023-03-10 22:34 出处:网络
Is there a tool that can get the full qualified name from types in assembly? i know how to construct the full qualified name, but i need something that loads the assembly like reflector for example a

Is there a tool that can get the full qualified name from types in assembly?

i know how to construct the full qualified name, but i need something that loads the assembly like reflector for example and开发者_如何学运维 take the fullqualified name from their types.


Assembly.Load("YourAssemblyName").GetTypes().Select(t => t.AssemblyQualifiedName)


You may try the AssemblyQualifiedName property:

class Program
{
    static void Main()
    {
        var types = Assembly.LoadFrom(@"c:\work\Foo.dll").GetTypes();
        foreach (var type in types)
        {
            Console.WriteLine(type.AssemblyQualifiedName);
        }
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消