TJC.ConsoleApplication
0.1.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package TJC.ConsoleApplication --version 0.1.1
NuGet\Install-Package TJC.ConsoleApplication -Version 0.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TJC.ConsoleApplication" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TJC.ConsoleApplication --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TJC.ConsoleApplication, 0.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TJC.ConsoleApplication as a Cake Addin #addin nuget:?package=TJC.ConsoleApplication&version=0.1.1 // Install TJC.ConsoleApplication as a Cake Tool #tool nuget:?package=TJC.ConsoleApplication&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Inputs
bool ConsoleInput.GetYesNo(string message)
- Prompts the user with the message and waits for a 'Y' or 'N' input (case-insensitive)
var result = ConsoleInput.GetYesNo("Do you want to continue?");
// Outputs: Do you want to continue? (Y/N):
// Waits for user input of 'Y' or 'N' (case-insensitive)
// Returns true if 'Y' and false if 'N'
// Outputs error message and waits for input again if input is invalid
string ConsoleInput.GetString(string message)
- Prompts the user with the message and waits for a string input
var result = ConsoleInput.GetString("Enter your name:");
// Outputs: Enter your name:
// Waits for user input of any string
// Returns the string input
string ConsoleInput.GetStringChange(string message, string original)
- Prompts the user to choose whether to change from original value or not
var original = "John"
var result = ConsoleInput.GetStringChange("MyName", original);
// Outputs: Do you want to change MyName from [John]? (Y/N):
// Waits for user input of 'Y' or 'N' (case-insensitive)
// Returns the original value if 'N' otherwise prompts for a new value
ConsoleInput.GetStringChange(string message, ref string value)
- Prompts the user to choose whether to change from original value or not
var original = "John"
ConsoleInput.GetStringChange("MyName", ref original);
// Outputs: Do you want to change MyName from [John]? (Y/N):
// Waits for user input of 'Y' or 'N' (case-insensitive)
// Returns the original value if 'N' otherwise prompts for a new value
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TJC.ConsoleApplication:
Package | Downloads |
---|---|
TJC.Collection.Console
Collection of NuGet Packages for Console Applications |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.14.3 | 147 | 11/15/2024 |
0.14.2 | 152 | 11/10/2024 |
0.14.1 | 90 | 11/5/2024 |
0.14.0 | 155 | 11/5/2024 |
0.13.1 | 286 | 10/27/2024 |
0.13.0 | 110 | 10/26/2024 |
0.12.1 | 75 | 10/26/2024 |
0.12.0 | 114 | 10/26/2024 |
0.11.0 | 68 | 10/26/2024 |
0.10.0 | 67 | 10/25/2024 |
0.8.0 | 111 | 10/20/2024 |
0.7.5 | 142 | 10/20/2024 |
0.7.4 | 80 | 10/20/2024 |
0.7.3 | 80 | 10/20/2024 |
0.7.2 | 146 | 10/16/2024 |
0.7.1 | 110 | 10/13/2024 |
0.7.0 | 113 | 10/11/2024 |
0.6.0 | 79 | 10/11/2024 |
0.5.0 | 80 | 10/11/2024 |
0.4.0 | 137 | 10/10/2024 |
0.3.0 | 137 | 10/9/2024 |
0.2.0 | 83 | 10/8/2024 |
0.1.27 | 143 | 10/6/2024 |
0.1.26 | 144 | 10/2/2024 |
0.1.25 | 142 | 9/29/2024 |
0.1.24 | 171 | 9/26/2024 |
0.1.23 | 177 | 9/9/2024 |
0.1.22 | 101 | 9/9/2024 |
0.1.21 | 127 | 9/6/2024 |
0.1.20 | 190 | 9/5/2024 |
0.1.19 | 99 | 9/5/2024 |
0.1.18 | 222 | 9/5/2024 |
0.1.17 | 98 | 9/5/2024 |
0.1.16 | 102 | 9/5/2024 |
0.1.15 | 148 | 9/4/2024 |
0.1.14 | 100 | 9/4/2024 |
0.1.13 | 92 | 9/3/2024 |
0.1.12 | 245 | 8/22/2024 |
0.1.11 | 128 | 8/22/2024 |
0.1.10 | 160 | 7/25/2024 |
0.1.9 | 90 | 7/24/2024 |
0.1.8 | 113 | 7/22/2024 |
0.1.7 | 106 | 7/22/2024 |
0.1.6 | 111 | 7/21/2024 |
0.1.5 | 101 | 7/21/2024 |
0.1.4 | 111 | 7/21/2024 |
0.1.3 | 103 | 7/21/2024 |
0.1.2 | 117 | 7/21/2024 |
0.1.1 | 110 | 7/21/2024 |
0.1.0 | 111 | 7/21/2024 |