API Reference
Class
ConsoleLineConsole
The ILineConsole over Console: standard input and output.
Inheritance
- Object
- ConsoleLineConsole
Usage
Explore 1 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 1
- Property ConsoleLineConsole.Instance
Constructors
public ConsoleLineConsole() #Methods
public Int32? Choose(String caption, String message, IReadOnlyList<String> choices, Int32 defaultIndex) #Returns:
Int32?Lets the host ask a choice question natively (PowerShell's PromptForChoice). Return null to fall back to a numbered list.
Parameters
- caption System.String
- The question.
- message System.String
- Extra text, or empty.
- choices System.Collections.Generic.IReadOnlyList<System.String>
- The choice labels.
- defaultIndex System.Int32
- The default choice, or -1.
Returns
The chosen index, or null when not supported.
public String? ReadSecret() #Returns:
String?Reads a line without echoing it; null when the input ended.
Returns
The secret.
public Void Write(String text) #Returns:
VoidWrites text without ending the line (the question before an answer).
Parameters
- text System.String
- The text.
public Void WriteLine(String text) #Returns:
VoidWrites a line.
Parameters
- text System.String
- The text.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?