[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 
2.0).
(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, 
'Type.IsGenericInstance'.

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 
properties?
Thanks,
/george

Notes:
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.
http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/P_System_Type_IsGenericTypeDefinition.asp

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! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




More information about the Mono-devel-list mailing list