Header menu logo FSharp.Core

Checked Module

Functions and values

Function or value Description

int8 value

Full Usage: int8 value

Parameters:
    value : ^T

Returns: sbyte
Modifiers: inline
Type parameters: ^T

Converts the argument to signed byte.

This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSByte method on the input type.

value : ^T
Returns: sbyte
Example

 Checked.int8 -12
Multiple items
module Checked from Microsoft.FSharp.Core.Operators

--------------------
module Checked from Microsoft.FSharp.Core.ExtraTopLevelOperators
val int8: value: 'T -> sbyte (requires member op_Explicit)
Evaluates to -12y.

Example

 Checked.int8 "129"
Multiple items
module Checked from Microsoft.FSharp.Core.Operators

--------------------
module Checked from Microsoft.FSharp.Core.ExtraTopLevelOperators
val int8: value: 'T -> sbyte (requires member op_Explicit)
Throws System.OverflowException.

uint8 value

Full Usage: uint8 value

Parameters:
    value : ^T

Returns: byte
Modifiers: inline
Type parameters: ^T

Converts the argument to byte.

This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Byte.Parse() on strings and otherwise requires a ToByte method on the input type.

value : ^T
Returns: byte
Example

 Checked.uint8 12
Multiple items
module Checked from Microsoft.FSharp.Core.Operators

--------------------
module Checked from Microsoft.FSharp.Core.ExtraTopLevelOperators
val uint8: value: 'T -> byte (requires member op_Explicit)
Evaluates to -12y.

Example

 Checked.uint8 -12
Multiple items
module Checked from Microsoft.FSharp.Core.Operators

--------------------
module Checked from Microsoft.FSharp.Core.ExtraTopLevelOperators
val uint8: value: 'T -> byte (requires member op_Explicit)
Throws System.OverflowException.

Type something to start searching.