FileSizeFormatProvider

Ecng.ComponentModel

File size format provider.

Implements: IFormatProvider, ICustomFormatter

Methods

System#ICustomFormatter#Format(string, object, IFormatProvider)

Converts the value of a specified object to an equivalent string representation using specified format and culture-specific formatting information.

format
A format string containing formatting specifications.
arg
An object to format.
formatProvider
An IFormatProvider object that supplies format information about the current instance.

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

System#IFormatProvider#GetFormat(Type)

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

formatType
An object that specifies the type of format object to get.

Returns: The current instance, if formatType is the same type as the current instance; otherwise, null.