FSharpValue.PreComputeTupleConstructorInfo 方法 (F#)

获取用于构造给定元组类型的对象的方法。对于小元组,将不返回任何附加类型。

命名空间/模块路径: Microsoft.FSharp.Reflection

程序集:FSharp.Core(在 FSharp.Core.dll 中)

// Signature:
static member PreComputeTupleConstructorInfo : Type -> ConstructorInfo * Type option

// Usage:
FSharpValue.PreComputeTupleConstructorInfo (tupleType)

参数

  • tupleType
    类型:Type

    输入元组类型。

返回值

元组类型构造函数的说明和适用于大元组的可选附加类型。

备注

对于大的元组,会返回一个附加类型,用来指示已为元组类型使用了嵌套编码方式。在这种情况下,元组类型的后缀部分具有给定类型,并且必须创建一个此类型的对象并将其作为最后一个参数传递给 ConstructorInfo。可以使用对 PreComputeTupleConstructorInfo 的递归调用来确定该后缀类型的构造函数。

平台

Windows 8,Windows 7,Windows server 2012中,Windows server 2008 R2

版本信息

F#核心库版本

支持:2.0,4.0,可移植

请参见

参考

Reflection.FSharpValue 类 (F#)

Microsoft.FSharp.Reflection 命名空间 (F#)