dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Generic IL Examples


From: Rhys Weatherley
Subject: [DotGNU]Generic IL Examples
Date: Wed, 19 Feb 2003 16:20:01 +1000
User-agent: KMail/1.4.3

Attached are a couple of examples of using Generic IL, pillaged from Gyro and 
modified to fix various bugs in the Gyro documentation.  I'm including these 
as a starting point for people who want to play around with the new generics 
support in the assembler and disassembler.

The first, "stack-generic.il", implements the "Stack<T>" type, demonstrating 
how to define a generic type in IL.  The second, "reverse-generic.il", 
implements the "Reverse<T>" method, demonstrating how to define a stand-alone 
generic method.  Terms such as "!0" refer to class-generic parameters, and 
"!!0" refer to method-generic parameters.

These should work with pnet's ilasm and ildasm programs.  Note: ilrun has not 
yet been modified to handle generics, so these programs won't run.  But it 
should get people started with testing.

Cheers,

Rhys.

Attachment: stack-generic.il
Description: Binary data

Attachment: reverse-generic.il
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]