Skip to Main Content Skip to Search
Product Documentation

NET.GenericClass class - Package: NET

Represent parameterized generic type definitions

Description

Instances of this class are used by the NET.createGeneric function when creation of generic specialization requires parameterization with another parameterized type.

Construction

genType = NET.GenericClass (className, paramTypes)

Input Arguments

className

Fully qualified string containing the generic type name.

paramTypes

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

  • Fully qualified string containing the generic type name.

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

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects in the MATLAB Programming Fundamentals documentation.

Examples

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.Collections.Generic.KeyValuePair',...
  'System.Int32', 'System.String');
kvpList = NET.createGeneric('System.Collections.Generic.List',...
  { kvpType }, 10);

See Also

NET.createArray | NET.createGeneric | NET.invokeGenericMethod

How To

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS