Table of Contents

Class UnitPrefixFormatter

Namespace
Cuemon
Assembly
Cuemon.Core.dll

Defines the string formatting of objects having an implementation of either IPrefixUnit or IUnit. Implements the System.IFormatProvider Implements the System.ICustomFormatter

public class UnitPrefixFormatter : IFormatProvider, ICustomFormatter
Inheritance
Object
UnitPrefixFormatter
Implements
IFormatProvider
ICustomFormatter

Methods

Format(String, Object, IFormatProvider)

Converts the value of a specified arg to an equivalent string representation using specified format and culture-specific format formatProvider.

public string Format(string format, object arg, IFormatProvider formatProvider)

Parameters

format String

A format string containing formatting specifications.

arg Object

An object that implements either interface IPrefixUnit, IUnit or both.

formatProvider IFormatProvider

An object that supplies format information about arg.

Returns

String

The string representation of the value of arg, formatted as specified by format and formatProvider.

GetFormat(Type)

Returns an object that provides formatting services for the specified type.

public object GetFormat(Type formatType)

Parameters

formatType Type

An object that specifies the type of format object to return.

Returns

Object

An instance of the object specified by formatType, if the System.IFormatProvider implementation can supply that type of object; otherwise, null.

See Also

IFormatProvider
ICustomFormatter
IUnit
IPrefixUnit