Show / Hide Table of Contents

Class UnitPrefixFormatter

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

Inheritance
Object
UnitPrefixFormatter
Implements
IFormatProvider
ICustomFormatter
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public class UnitPrefixFormatter : IFormatProvider, ICustomFormatter

Methods

| Improve this Doc View Source

Format(String, Object, IFormatProvider)

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

Declaration
public string Format(string format, object arg, IFormatProvider formatProvider)
Parameters
Type Name Description
String format

A format string containing formatting specifications.

Object arg

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

IFormatProvider formatProvider

An object that supplies format information about arg.

Returns
Type Description
String

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

| Improve this Doc View Source

GetFormat(Type)

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

Declaration
public object GetFormat(Type formatType)
Parameters
Type Name Description
Type formatType

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

Returns
Type Description
Object

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

Implements

System.IFormatProvider
System.ICustomFormatter

See Also

IFormatProvider
ICustomFormatter
IUnit
IPrefixUnit
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright 2008-2022 Geekle. All rights reserved. Code with passion and love; deploy with confidence. 👨‍💻️🔥❤️🚀😎
Generated by DocFX