Reflection.FSharpType Class (F#)

Contains operations associated with constructing and analyzing F# types such as records, unions and tuples.

Namespace/Module Path: Microsoft.FSharp.Reflection

Assembly: FSharp.Core (in FSharp.Core.dll)

[<AbstractClass>]
[<Sealed>]
type FSharpType =
 class
  static member GetExceptionFields : Type * ?BindingFlags -> PropertyInfo []
  static member GetFunctionElements : Type -> Type * Type
  static member GetRecordFields : Type * ?BindingFlags -> PropertyInfo []
  static member GetTupleElements : Type -> Type []
  static member GetUnionCases : Type * ?BindingFlags -> UnionCaseInfo []
  static member IsExceptionRepresentation : Type * ?BindingFlags -> bool
  static member IsFunction : Type -> bool
  static member IsModule : Type -> bool
  static member IsRecord : Type * ?BindingFlags -> bool
  static member IsTuple : Type -> bool
  static member IsUnion : Type * ?BindingFlags -> bool
  static member MakeFunctionType : Type * Type -> Type
  static member MakeTupleType : Type [] -> Type
 end

Static Members

Member

Description

GetExceptionFields

Reads all the fields from an F# exception declaration, in declaration order.

GetFunctionElements

Gets the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type.

GetRecordFields

Reads all the fields from a record value, in declaration order.

GetTupleElements

Gets the tuple elements from the representation of an F# tuple type.

GetUnionCases

Gets the cases of a union type.

IsExceptionRepresentation

Returns true if the specified type is a representation of an F# exception declaration.

IsFunction

Returns true if the specified type is a representation of an F# function type or the runtime type of a closure implementing an F# function type.

IsModule

Returns true if the specified type is a Type value corresponding to the compiled form of an F# module.

IsRecord

Returns true if the specified type is a representation of an F# record type.

IsTuple

Returns true if the specified type is a representation of an F# tuple type.

IsUnion

Returns true if the specified type is a representation of an F# union type or the runtime type of a value of that type.

MakeFunctionType

Returns a Type object representing the F# function type with the given domain and range.

MakeTupleType

Returns a Type representing an F# tuple type with the given element types.

Platforms

Windows 7, Windows Vista SP2, Windows XP SP3, Windows XP x64 SP2, Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2003 SP2

Version Information

F# Runtime

Supported in: 2.0, 4.0

Silverlight

Supported in: 3

See Also

Reference

Microsoft.FSharp.Reflection Namespace (F#)