MATLAB 帮助中心
命名空间: NET
表示参数化泛型类型定义
NET.createGeneric 函数使用此类的实例创建泛型特化实例,此操作要求用另一参数化类型进行参数化。
NET.createGeneric
genType = NET.GenericClass(className,paramTypes)
genType
className
paramTypes
全部展开
完全限定的泛型类型名称,指定为字符串或字符向量。
NET.GenericClass
泛型类参数化的参数类型 1 到 N(如果有),指定为:
字符串或字符向量,其中包含完全限定的泛型类型名称。
NET.GenericClass 类实例(需要使用另一参数化类型进行更深层次的嵌套参数化时)。
全部折叠
System.Collections.Generic.List
创建一个 System.Collections.Generic.KeyValuePair 泛型关联的 System.Collections.Generic.List 实例,其中 Key 是 System.Int32 类型,Value 是初始存储容量为 10 个键-值对组的 System.String。
System.Collections.Generic.KeyValuePair
Key
System.Int32
Value
System.String
kvpType = NET.GenericClass(... 'System.Collections.Generic.KeyValuePair',... 'System.Int32', 'System.String'); kvpList = NET.createGeneric('System.Collections.Generic.List',... {kvpType}, 10);
在 R2009a 中推出
NET.createGeneric | NET.createArray | NET.invokeGenericMethod
NET.createArray
NET.invokeGenericMethod
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处