Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Latest commit

 

History

History
75 lines (60 loc) · 4 KB

reflection.fsharptype-class-[fsharp].md

File metadata and controls

75 lines (60 loc) · 4 KB
title description keywords author manager ms.date ms.topic ms.prod ms.technology ms.assetid
Reflection.FSharpType Class (F#)
Reflection.FSharpType Class (F#)
visual f#, f#, functional programming
dend
danielfe
05/16/2016
language-reference
visual-studio-dev14
devlang-fsharp
a4f5802f-885d-42e1-9b9d-b5e640fb027b

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)

Syntax

[<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 System.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 System.Type object representing the F# function type with the given domain and range.
MakeTupleType Returns a System.Type representing an F# tuple type with the given element types.

Platforms

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Microsoft.FSharp.Reflection Namespace (F#)