PC Review


Reply
Thread Tools Rate Thread

Create Type with just the fullname

 
 
Dan Holmes
Guest
Posts: n/a
 
      23rd Apr 2007
Is there any way to create an instance of type Type when all that is
known is the FullName of the type? I was trying Type.GetType but that
requires an AssemblyQualifiedName. I don't have the assembly, just the
name of the class.

dan
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      23rd Apr 2007
Dan,

No, it is not possible, you need the assembly name as well. The only
way you could create a type from the full name of the type without the
assembly name is to make the call to GetType in the assembly that the type
is located in. Otherwise, you need the assembly qualified name of the type
as well.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Dan Holmes" <(E-Mail Removed)> wrote in message
news:u%(E-Mail Removed)...
> Is there any way to create an instance of type Type when all that is known
> is the FullName of the type? I was trying Type.GetType but that requires
> an AssemblyQualifiedName. I don't have the assembly, just the name of the
> class.
>
> dan



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Name vs FullName Tim Childs Microsoft Excel Programming 4 16th Apr 2011 11:15 PM
Get generic type fullname without assembly version,culture and PublicKeyToken zlf Microsoft C# .NET 1 18th Jun 2008 07:16 AM
when serializing XML, how to NOT save type's fullname james.tsao@gmail.com Microsoft Dot NET Framework 0 20th Aug 2006 08:33 PM
Type.FullName returns malformed name George Microsoft VB .NET 4 15th Sep 2004 09:24 AM
Type.FullName with a Plus? Matthew Wieder Microsoft C# .NET 3 12th Nov 2003 11:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:34 PM.