Header menu logo FSharp.Core

Unchecked Module

This module contains basic operations which do not apply runtime and/or static checks

Functions and values

Function or value Description

compare arg1 arg2

Full Usage: compare arg1 arg2

Parameters:
    arg0 : 'T
    arg1 : 'T

Returns: int The result of the comparison.
Modifiers: inline
Type parameters: 'T

Perform generic comparison on two values where the type of the values is not statically required to have the 'comparison' constraint.

arg0 : 'T
arg1 : 'T
Returns: int

The result of the comparison.

defaultof

Full Usage: defaultof

Returns: 'T
Modifiers: inline
Type parameters: 'T

Generate a default value for any type. This is null for reference types, For structs, this is struct value where all fields have the default value. This function is unsafe in the sense that some F# values do not have proper null values.

Returns: 'T

equals arg1 arg2

Full Usage: equals arg1 arg2

Parameters:
    arg0 : 'T
    arg1 : 'T

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Perform generic equality on two values where the type of the values is not statically required to satisfy the 'equality' constraint.

arg0 : 'T
arg1 : 'T
Returns: bool

The result of the comparison.

hash arg1

Full Usage: hash arg1

Parameters:
    arg0 : 'T

Returns: int The computed hash value.
Modifiers: inline
Type parameters: 'T

Perform generic hashing on a value where the type of the value is not statically required to satisfy the 'equality' constraint.

arg0 : 'T
Returns: int

The computed hash value.

nonNull value

Full Usage: nonNull value

Parameters:
    value : 'T - The possibly nullable value.

Returns: 'T The same value as in the input.
Modifiers: inline
Type parameters: 'T

Unsafely retypes the value from ('T | null) to 'T without doing any null check at runtime. This is an unsafe operation.

value : 'T

The possibly nullable value.

Returns: 'T

The same value as in the input.

unbox value

Full Usage: unbox value

Parameters:
    value : objnull - The boxed value.

Returns: 'T The unboxed result.
Modifiers: inline
Type parameters: 'T

Unboxes a strongly typed value. This is the inverse of box, unbox(box a) equals a.

value : objnull

The boxed value.

Returns: 'T

The unboxed result.

Active patterns

Active pattern Description

(|NonNullQuick|) value

Full Usage: (|NonNullQuick|) value

Parameters:
    value : 'T - The value to retype from ('T | null) to 'T .

Returns: 'T The non-null value.
Modifiers: inline
Type parameters: 'T

When used in a pattern forgets 'nullness' of the value without any runtime check. This is an unsafe operation, as null check is being skipped and null value can be returned.

value : 'T

The value to retype from ('T | null) to 'T .

Returns: 'T

The non-null value.

Type something to start searching.