Skip to content
ConsoleMonster

API Reference

Class

NumberField

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Base Field
Modifiers sealed

A number with an optional range and step.

Inheritance

Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Constructors

public NumberField(String name, String? label = null) #

Creates a number field.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.

Methods

public override String Display(Object? value, PromptLabels labels) #
Returns: String

The value as shown in the form and on the review page.

Parameters

value System.Object? requiredposition: 0
The value.
labels ConsoleMonster.Interactive.PromptLabels requiredposition: 1
The labels.

Returns

The text.

Properties

public override FieldKind Kind { get; } #

The kind.

public Boolean WholeNumber { get; set; } #

Whether only whole numbers are accepted.

public Decimal? Minimum { get; set; } #

The smallest value.

public Decimal? Maximum { get; set; } #

The largest value.

public Decimal Step { get; set; } #

The step of Up and Down.