Table of Contents

Class stdin

Namespace
Dassie.Core
Assembly
Dassie.Core.dll

Provides functionality for reading from standard input.

public static class stdin
Inheritance
stdin
Inherited Members

Methods

prompt(string)

Reads a line from the standard input with a prompt.

public static string prompt(string prompt)

Parameters

prompt string

The prompt message to display.

Returns

string

Returns a line of text read from the standard input.

promptf(string, params object[])

Reads a line from the standard input with a prompt and formats it using the specified arguments.

public static string promptf(string prompt, params object[] args)

Parameters

prompt string

The prompt message to display.

args object[]

The formatting arguments.

Returns

string

Returns the formatted string.

rdbool()

Reads a line from the standard input and attempts to convert it to a boolean.

public static bool rdbool()

Returns

bool

The converted boolean.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdbool(string)

Reads a line from the standard input and attempts to convert it to a boolean.

public static bool rdbool(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

bool

The converted boolean.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdchar()

Reads a line from the standard input and attempts to convert it to a UTF-16 character.

public static char rdchar()

Returns

char

The converted character.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdchar(string)

Reads a line from the standard input and attempts to convert it to a UTF-16 character.

public static char rdchar(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

char

The converted character.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rddec()

Reads a line from the standard input and attempts to convert it to a decimal number.

public static decimal rddec()

Returns

decimal

The converted decimal number.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rddec(string)

Reads a line from the standard input and attempts to convert it to a decimal number.

public static decimal rddec(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

decimal

The converted decimal.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdfloat32()

Reads a line from the standard input and attempts to convert it to a 32-bit floating point number.

public static float rdfloat32()

Returns

float

The converted floating point number.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdfloat32(string)

Reads a line from the standard input and attempts to convert it to a 32-bit floating point number.

public static float rdfloat32(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

float

The converted number.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdfloat64()

Reads a line from the standard input and attempts to convert it to a 64-bit floating point number.

public static double rdfloat64()

Returns

double

The converted floating point number.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdfloat64(string)

Reads a line from the standard input and attempts to convert it to a 64-bit floating point number.

public static double rdfloat64(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

double

The converted number.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint()

Reads a line from the standard input and attempts to convert it to an integer.

public static int rdint()

Returns

int

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint(string)

Reads a line from the standard input and attempts to convert it to an integer.

public static int rdint(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

int

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint16()

Reads a line from the standard input and attempts to convert it to a 16-bit integer.

public static short rdint16()

Returns

short

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint16(string)

Reads a line from the standard input and attempts to convert it to a 16-bit integer.

public static short rdint16(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

short

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint32()

Reads a line from the standard input and attempts to convert it to an integer.

public static int rdint32()

Returns

int

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint32(string)

Reads a line from the standard input and attempts to convert it to an integer.

public static int rdint32(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

int

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint64()

Reads a line from the standard input and attempts to convert it to a 64-bit integer.

public static long rdint64()

Returns

long

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint64(string)

Reads a line from the standard input and attempts to convert it to a 64-bit integer.

public static long rdint64(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

long

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint8()

Reads a line from the standard input and attempts to convert it to an 8-bit integer.

public static sbyte rdint8()

Returns

sbyte

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdint8(string)

Reads a line from the standard input and attempts to convert it to an 8-bit integer.

public static sbyte rdint8(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

sbyte

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdkey()

Reads a single key press from standard input.

public static ConsoleKeyInfo rdkey()

Returns

ConsoleKeyInfo

The read line.

Exceptions

IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdkey(string)

Reads a single key press from standard input.

public static ConsoleKeyInfo rdkey(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

ConsoleKeyInfo

The read key.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdstr()

Reads a line from the standard input.

public static string rdstr()

Returns

string

The read line.

Exceptions

IOException
OutOfMemoryException
ArgumentOutOfRangeException

rdstr(string)

Reads a line from standard input.

public static string rdstr(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

string

The read line.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint()

Reads a line from the standard input and attempts to convert it to an unsigned integer.

public static uint rduint()

Returns

uint

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint(string)

Reads a line from the standard input and attempts to convert it to an unsigned integer.

public static uint rduint(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

uint

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint16()

Reads a line from the standard input and attempts to convert it to an unsigned 16-bit integer.

public static ushort rduint16()

Returns

ushort

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint16(string)

Reads a line from the standard input and attempts to convert it to an unsigned 16-bit integer.

public static ushort rduint16(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

ushort

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint32()

Reads a line from the standard input and attempts to convert it to an unsigned integer.

public static uint rduint32()

Returns

uint

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint32(string)

Reads a line from the standard input and attempts to convert it to an unsigned integer.

public static uint rduint32(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

uint

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint64()

Reads a line from the standard input and attempts to convert it to an unsigned 64-bit integer.

public static ulong rduint64()

Returns

ulong

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint64(string)

Reads a line from the standard input and attempts to convert it to an unsigned 64-bit integer.

public static ulong rduint64(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

ulong

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint8()

Reads a line from the standard input and attempts to convert it to an unsigned 8-bit integer.

public static byte rduint8()

Returns

byte

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

rduint8(string)

Reads a line from the standard input and attempts to convert it to an unsigned 8-bit integer.

public static byte rduint8(string prompt)

Parameters

prompt string

The prompt to display before reading from standard input.

Returns

byte

The converted integer.

Exceptions

FormatException
ArgumentNullException
OverflowException
IOException
OutOfMemoryException
ArgumentOutOfRangeException

scan()

Reads a line from the standard input.

public static string scan()

Returns

string

Returns a line of text read from the standard input.

Exceptions

IOException
OutOfMemoryException
ArgumentOutOfRangeException

scanf(params object[])

Reads a line from the standard input and formats it using the specified arguments.

public static string scanf(params object[] args)

Parameters

args object[]

The formatting arguments.

Returns

string

Returns the formatted string.