yo2011
yo2011

Reputation: 1021

How to get the assembly name(not qualified name) from type(only assembly name without version or culture or publickeyToken) in c#

How to get the assembly name (only name ) without namespace or culture or public key token;typeof (MyClass).AssemblyQualifiedName ---> give me the fully qualified name and i want only the assembly name not the qualified name

Upvotes: 1

Views: 1095

Answers (1)

AlexD
AlexD

Reputation: 32576

To get simple name of the assembly, try

typeof(MyClass).Assembly.GetName().Name

Upvotes: 5

Related Questions