TinyConsoleTemplate.CSharp
1.0.9
dotnet add package TinyConsoleTemplate.CSharp --version 1.0.9
NuGet\Install-Package TinyConsoleTemplate.CSharp -Version 1.0.9
<PackageReference Include="TinyConsoleTemplate.CSharp" Version="1.0.9" />
<PackageVersion Include="TinyConsoleTemplate.CSharp" Version="1.0.9" />
<PackageReference Include="TinyConsoleTemplate.CSharp" />
paket add TinyConsoleTemplate.CSharp --version 1.0.9
#r "nuget: TinyConsoleTemplate.CSharp, 1.0.9"
#:package TinyConsoleTemplate.CSharp@1.0.9
#addin nuget:?package=TinyConsoleTemplate.CSharp&version=1.0.9
#tool nuget:?package=TinyConsoleTemplate.CSharp&version=1.0.9
TinyConsoleTemplate.CSharp
This template is designed to create a simple console application in C#.
This template is designed for learning C# programming. It simplifies the use of console output and console input operations.
It supports two options for creating a project:
- Using Top-level statements (modern approach)
- Classic option with the
Mainmethod by key -us
Install template
dotnet new install TinyConsoleTemplate.CSharp::<version>
For example:
dotnet new install TinyConsoleTemplate.CSharp::1.0.8
Usage
After installing the template, you can create a project as follows:
dotnet new tinyconsole --name MyApp
dotnet new tinyconsole --name MyApp -us
Get help by command
dotnet new tinyconsole --help
Uninstall template by command
dotnet new uninstall TinyConsoleTemplate.CSharp
Sample code in C#
namespace MyApp
{
class Program
{
static void Main(string[] args)
{
WriteLine("Hello from TinyConsoleTemplate with classic Main method!");
string? name = ReadInput("What is your name? ");
name = string.IsNullOrEmpty(name) ? "Anonymous" : name.Trim();
WriteLine($"Hello, {name}! Enjoy using the TinyConsoleTemplate and the TinyConsoleUtils library to create cool C# console applications!");
}
}
}
As you can see, this template and the library connected with it allow you to use shorter statements for input and output from the console.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.