How to locate assembly-qualified name

L

Larry Smith

Hi there,

How can I convert this:

"System.Windows.Forms.Form"

to this:

"System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"

Note that I'm dealing with native .NET types only. Thank you.
 
D

Dustin Campbell

How can I convert this:
"System.Windows.Forms.Form"

to this:

"System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"

Note that I'm dealing with native .NET types only. Thank you.

Have you tried something like this yet?

Type myType = Type.GetType("System.Windows.Forms.Form"); // or typeof(System.WIndows.Forms.Form)
myType.AssemblyQualifiedName.


Best Regards,
Dustin Campbell
Developer Express Inc.
 
L

Larry Smith

Have you tried something like this yet?
Type myType = Type.GetType("System.Windows.Forms.Form"); // or
typeof(System.WIndows.Forms.Form)
myType.AssemblyQualifiedName.

Thanks for the feedback. Foolish me. I looked at it but misunderstood its
argument. I thought it required an assembly-qualified name which is what I'm
trying to get of course (creating a chicken-and-egg scenario). After reading
further down however I now see it takes any name. One test later and (lo and
behold) it works. Thanks again (mea culpa)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top