.NET Generic Classes in MATLAB
Generic classes are a feature of the C# programming language. These topics show how to use generic classes in MATLAB.
Functions
| NET.createGeneric | Create instance of specialized .NET generic type | 
| NET.invokeGenericMethod | Invoke generic method of object | 
| NET.convertArray | (Not recommended) Convert numeric MATLAB array to .NET array | 
Classes
| NET.GenericClass | Represent parameterized generic type definitions | 
Topics
- Create .NET CollectionsThis example uses two System.Stringarrays,d1andd2, to create a generic collection list.
- Convert .NET Collections to MATLAB ArraysUse the ToArraymethod of theSystem.Collections.Generic.Listclass to convert a collection to an array.
- Create .NET Arrays of Generic TypeThis example creates a .NET array of List<Int32>generic type.
- Display .NET Generic Methods Using ReflectionshowGenericMethodsfunction example.
- .NET Generic ClassesGenerics are classes and methods that have placeholders (type parameters or parameterized types) for one or more types. 
- Accessing Items in .NET CollectionsUse the Itemproperty of theSystem.Collections.GenericListclass to get or set an element at a specified index.
- Call .NET Generic MethodsExample NetDocGeneric.SampleClasssource code.