It is a “generic” (i.e its full name is List<T>), which means that you need to provide a Type (i.e. a class) for “T”.
We do not have a syntax to do that. So, it is not possible to create one directly from Dyalog.
Having said that, you can use. Type.MakeGenericType (https://msdn.microsoft.com/en-us/library/system.type.makegenerictype(v=vs.110).aspx) to create a Type, and then use Activator.CreateInstance (https://msdn.microsoft.com/en-us/library/wcxyzt4d(v=vs.110).aspx) to create an instance of it.
So, the following code is an example of that, which works in .NET Framework 4
Code: Select all
⎕USING←'' 'System' 'System,System.dll' 'System.Text' 'System.Type'
bytearr←System.Array.CreateInstance(System.Type.GetType⊂'System.Byte')20
listcoltype←Type.GetType⊂'System.Collections.Generic.List`1'
lobj←listcoltype.MakeGenericType(⊂,Type.GetType⊂'System.Byte')
listcol1←Activator.CreateInstance lobj(,⊂bytearr)