TinyConsoleTemplate.CSharp 1.0.9

dotnet add package TinyConsoleTemplate.CSharp --version 1.0.9
                    
NuGet\Install-Package TinyConsoleTemplate.CSharp -Version 1.0.9
                    
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="TinyConsoleTemplate.CSharp" Version="1.0.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TinyConsoleTemplate.CSharp" Version="1.0.9" />
                    
Directory.Packages.props
<PackageReference Include="TinyConsoleTemplate.CSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TinyConsoleTemplate.CSharp --version 1.0.9
                    
#r "nuget: TinyConsoleTemplate.CSharp, 1.0.9"
                    
#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.
#:package TinyConsoleTemplate.CSharp@1.0.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TinyConsoleTemplate.CSharp&version=1.0.9
                    
Install as a Cake Addin
#tool nuget:?package=TinyConsoleTemplate.CSharp&version=1.0.9
                    
Install as a Cake Tool

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 Main method 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.

There are no supported framework assets in this package.

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.

Version Downloads Last Updated
1.0.9 420 1/18/2025
1.0.8 406 11/16/2024
1.0.7 386 11/16/2024
1.0.6 396 11/16/2024
1.0.5 406 11/16/2024
1.0.4 395 11/16/2024
1.0.3 415 11/16/2024
1.0.2 399 11/16/2024
1.0.1 399 11/16/2024
1.0.0 408 11/16/2024