PC Review


Reply
Thread Tools Rate Thread

Determine if type is a system type

 
 
=?Utf-8?B?bGpsZXZlbmQ=?=
Guest
Posts: n/a
 
      19th Nov 2004
I want to determine if a System.Type represents a system type (i.e., a type
that is defined in the .NET framework). The System.Type.UnderlyingSystemType
seems like the type of thing that I'm after, but that property always seems
to return the same type as the original type (i.e., type is
type.UnderlyingSystemType always seems to be True).

Thanks for any help.
Lance

 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      19th Nov 2004

>I want to determine if a System.Type represents a system type (i.e., a type
>that is defined in the .NET framework).


You can check the Assembly property of the type and see if it matches
a list of known assemblies that are in the .NET framework. But keep in
mind that such a list can be different from one framework version to
another.



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
 
=?Utf-8?B?bGpsZXZlbmQ=?=
Guest
Posts: n/a
 
      20th Nov 2004
Thanks.
 
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
Unable to cast object of type 'System.Web.UI.WebControls.SqlDataSource' to type 'System.Collections.IEnumerable'. Chris Microsoft ASP .NET 1 12th Feb 2007 04:42 PM
Determine that a System.Type is a Structure or not sos00 Microsoft Dot NET Framework 7 7th Feb 2006 07:43 PM
Dynamiclly Determine Type of Parameter and Type Cast it (code insi =?Utf-8?B?TGVubg==?= Microsoft C# .NET 1 14th Dec 2005 09:24 PM
Determine System.Type from an array Jeremy Chapman Microsoft Dot NET Framework 1 29th Jun 2005 11:00 PM
Determine System.Type of a class Wasim Akram Microsoft VB .NET 1 3rd Oct 2004 07:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:52 PM.