Gaby
Gaby

Reputation: 3033

Tool to get full qualified type name

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.

Upvotes: 0

Views: 195

Answers (2)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038890

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);
        }
    }
}

Upvotes: 1

Aasmund Eldhuset
Aasmund Eldhuset

Reputation: 37950

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

Upvotes: 4

Related Questions