Class FileSizesExtensions
Provides extension methods for converting file sizes between bytes, kilobytes, and megabytes.
public static class FileSizesExtensions
- Inheritance
-
FileSizesExtensions
- Inherited Members
Methods
FromKB(long)
Converts the specified number of kilobytes to bytes.
public static long FromKB(this long kbytes)
Parameters
kbytes
longThe number of kilobytes.
Returns
- long
The equivalent number of bytes.
FromMB(long)
Converts the specified number of megabytes to bytes.
public static long FromMB(this long mbytes)
Parameters
mbytes
longThe number of megabytes.
Returns
- long
The equivalent number of bytes.
ToKB(long)
Converts the specified number of bytes to kilobytes.
public static long ToKB(this long bytes)
Parameters
bytes
longThe number of bytes.
Returns
- long
The equivalent number of kilobytes.
ToMB(long)
Converts the specified number of bytes to megabytes.
public static long ToMB(this long bytes)
Parameters
bytes
longThe number of bytes.
Returns
- long
The equivalent number of megabytes.