Class UnitPrefixFormatter
Defines the string formatting of objects having an implementation of either IPrefixUnit or IUnit. Implements the IFormatProvider Implements the ICustomFormatter
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public class UnitPrefixFormatter : IFormatProvider, ICustomFormatter
Methods
| Improve this Doc View SourceFormat(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 |
Returns
Type | Description |
---|---|
String | The string representation of the value of |
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 |