Mohamed Ahmed Mohamed Ahmed - 23 days ago 17
C# Question

Get the fully qualified name of a class in compiling environment?

In many situations I need the full name of a class, to use it to run commands in PMC like specifying the

-ContextTypeName
in EF migrations, is there a fast way to get it, rather tracking where it lives- the hard way?

EDIT

I apparently didn't mean something like this:

string fullyQualifiedName = typeof(MyType).AssemblyQualifiedName;


I need something that Visual Studio may come with as a tool or extension that enable me copying the full name from the context menu of the class identifier

Answer

A quick search of the Visual Studio Extensions Gallery has lead me this extension: Copy Qualified Name for Visual Studio which appears to possibly do what you are after.

Once installed, right click on a class name and select Copy qualified name option from the context, and the qualified name of the class will be copied to the clipboard.

Comments