Skip to content

HVC Shared — Usage

  • Project: hvc-shared

Referencing

Consumers reference the project (or the hvc.shared NuGet package) and add using Hvc.Shared;.

Examples

csharp
using Hvc.Shared;

// pipe a value through functions
var result = " 42 ".pipe(trim, asInt);      // 42

// safe conversions
var n = asDecimal("1,5");                    // 1.5 (or null)

// optional handling
mapIfNotNull(null, x => x.ToString());       // null

Released under the MIT License.