Method SizeToExplorerString
SizeToExplorerString(long?, IFormatProvider?)
Returns the text representation of a file size in the style used by Windows File Explorer, with localizable unit strings.
public static string SizeToExplorerString(long? bytes, IFormatProvider? formatProvider = null)
Parameters
byteslong?The file size in bytes.
formatProviderIFormatProviderThe format provider to use for formatting the file size. If null, the current culture is used.
Returns
- string
File size string, e.g. "1.2 MB"