By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,645 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,645 IT Pros & Developers. It's quick & easy.

Qualified type names and GetType(String)

P: n/a
KK
Two quick questions:

1.) Given only a string containing fully qualified type name (e.g.
"System.Drawing.Rectangle"), is there a consistent way to get the Type
object that the string corresponds to that will work with most types?

2.) If no to question 1, then given the string containing the fully
qualified type name, is there a way to get the fully qualified assembly
containing that type?

Thanks again for your help. =)
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
1.) Given only a string containing fully qualified type name (e.g.
"System.Drawing.Rectangle"), is there a consistent way to get the Type
object that the string corresponds to that will work with most types?

2.) If no to question 1, then given the string containing the fully
qualified type name, is there a way to get the fully qualified assembly
containing that type?

In general the answer is no to both questions, since multiple
assemblies can contain types with the same type name in the same
namespace. You either need an assembly-qualified type name or somehow
restrict the set of assemblies to look in.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.