Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.47 KB

File metadata and controls

61 lines (40 loc) · 1.47 KB
id quick-start
title Five-minute quick start
sidebar_position 4
diataxis tutorial
persona new developer

import CodeBlock from '@theme/CodeBlock'; import quickStart from '!!raw-loader!../_examples/quick-start/Program.cs';

Five-minute quick start

Orientation

You will create a console app, install Humanizer, and produce one deterministic duration. You need a .NET 8 or newer SDK.

Example

Create the project and install Humanizer 4 from NuGet:

dotnet new console --name HumanizerQuickStart
cd HumanizerQuickStart
dotnet add package Humanizer --version 4.0.0

Replace Program.cs with the verified source:

{quickStart}

Run it:

dotnet run

Result

The program prints exactly:

2 minutes

The assertion fails immediately if the selected package produces a different value.

Pitfall

Many Humanizer operations use the current culture or UI culture when no culture is supplied. Set both explicitly in examples, tests, background work, and any operation whose output must be predictable.

Version notes

This source is compiled and run during documentation validation. Historical snapshots retain the same source and resolve their declared package version.

Related guides and API