[Mono-dev] gmcs: 'Type.IsGenericInstance' property

george moudry gmoudry_2004 at hotmail.com
Wed Dec 7 07:04:37 EST 2005

Dear Mono-devel,
I would like to compile gmcs with Microsoft's DLLs (mscorlib.dll version 
(Reason: just downloaded Visual Studio Express, and created a tiny project 
for gmcs to try both out)
Compilation fails because gmcs uses a Mono-library-specific property, 

Two questions:
1) what is 'IsGenericInstance' equivalent to - is it .NET2.0 
Type.IsGenericTypeDefinition, or is it Type.IsGenericType?
2) would gmcs accept a patch to replace IsGenericInstance with .NET2.0 

Microsoft's explanation:
Type.IsGenericTypeDefinition Property: Gets a value that indicates whether 
the current Type represents the definition of a generic type, or whether one 
or more of its type parameters has been specified.

Type.IsGenericType Property: Gets a value that indicates whether the current 
type is a generic type.

Mono's explanation from 'ChangeLog':
2003-09-25  Martin Baulig  <martin at ximian.com>
	* Type.cs (Type.IsGenericTypeDefinition): Removed this method
	since it was identical to GetGenericTypeDefinition().
	(Type.IsGenericInstance): New property.

Nice discussion of Type.IsGenericType vs IsGenericTypeDefinition:
Partho's Weblog http://blogs.msdn.com/parthopdas/archive/category/11155.aspx
(see also the 'references' section in this page)

Don’t just search. Find. Check out the new MSN Search! 

More information about the Mono-devel-list mailing list