Table of Contents

CreateUnit Method

Definition

Namespace
Codebelt.Unitify
Assemblies
Codebelt.Unitify.dll
Source
src/Codebelt.Unitify/UnitFactory.cs

CreateUnit(string, string, string, double, IPrefix, Action<UnitFormatOptions>)

Creates a custom unit of measure.

public static IPrefixUnit CreateUnit(string category, string name, string symbol, double value, IPrefix prefix, Action<UnitFormatOptions> setup = null)

Parameters

category string

The category of the unit.

name string

The name of the unit.

symbol string

The symbol of the unit.

value double

The value of the unit.

prefix IPrefix

The prefix of the unit.

setup Action<UnitFormatOptions>

The UnitFormatOptions which may be configured.

Returns

IPrefixUnit

A custom unit of measure.