N 0.2.0

Requires NuGet 4.0 or higher.

Install-Package N -Version 0.2.0
dotnet add package N --version 0.2.0
<PackageReference Include="N" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add N --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: N, 0.2.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install N as a Cake Addin
#addin nuget:?package=N&version=0.2.0

// Install N as a Cake Tool
#tool nuget:?package=N&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

N - The Library for World's Smallest C# Program "That Does Something"�

Tired of boilerplate? Then N is for you!

NuGet version (N) NuGet version (N)

Blog Post

World's Smallest C# Program (featuring N)

Small Programs

Install N and all you need for a full C# program in Program.cs is (at 4 characters):


Want to increment?








Absolutely need to assign something?




Declare a variable for a reference type (with warning) - this doesn't really do much:

O o;

or for a value type (with warning):

S s;

In addition, N let's you write the smallest programs featuring specific constructs:

Want to be asynchronous? World's Smallest C# async/await Program (8 characters)

await T;

Want to return a code? (9 characters)

return I;

Need a while loop (9 characters):


or for loop (9 characters):


or do while loop (13 characters):


Need to new something up (7 characters).

new O();

What about args? Ns got you covered (8 characters).


Remember the GetAwaiter() loop hole? N let's you await an integer (8 characters).

await 1;

Need to dispose with using:


Want to just return? You don't need N 😉


Want to do nothing? You don't need N 😉


This should be the world's smallest C# program out-of-the-box in .NET 5+ and C# 9+.

Supported Frameworks and Language

.NET Standard 2.0+ C# 10+

  • .NETStandard 2.0

    • 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
0.2.0 236 10/9/2021
0.1.0 123 10/2/2021