News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

Generics Samples (Consuming Generics)

Started by sukishan, Jul 14, 2009, 04:32 PM

Previous topic - Next topic

sukishan

Generics Samples (Consuming Generics) 

The samples in this section demonstrate creating generics in C# and consuming them in J#.

Generic Stack Class Sample (Consuming Using J#) - The generic stack type imposes a constraint that the type parameter 'T' must be a type that implements the interface IDisplay

Delegate Sample (Applying a Generic Delegate Type) - A generic delegate type, Proc, is declared in C#. From J#, instantiate and apply the generic delegate type.

Generic Stack Interface Sample (Consuming an Interface) - The generic stack class implements a generic stack interface. From J#, consume this generic stack class in terms of the generic stack interface.

Generic Printing Method Sample (Prints an Array of Types) - A "printer" type has a generic method that can print out an array of types onto the console. This type is consumed from J#, providing different constructed types.
A good beginning makes a good ending