This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

NET.GenericClass class

Package: NET

Represent parameterized generic type definitions


The NET.createGeneric function uses instances of this class to create a generic specialization that requires parameterization with another parameterized type.


genType = NET.GenericClass(className,paramTypes)

Input Arguments


Character vector containing the fully qualified generic type name.


Optional, variable length (1 to N) list of types for the generic class parameterization. Allowed argument types are:

  • Character vector containing the fully qualified generic type name.

  • Instance of the NET.GenericClass class when deeper nested parameterization with another parameterized type is needed.


Create an instance of System.Collections.Generic.List of System.Collections.Generic.KeyValuePair generic associations where Key is of System.Int32 type and Value is a System.String class with initial storage capacity for 10 key-value pairs.

kvpType = NET.GenericClass(...
    'System.Int32', 'System.String');
kvpList = NET.createGeneric('System.Collections.Generic.List',...
    {kvpType}, 10);

Introduced in R2009a

Was this topic helpful?