Skip to main content
Version: 3.0.8

Humanizer.ByteSizeExtensions

ByteSizeExtensions Class

Provides extension methods for ByteSize

public static class ByteSizeExtensions

Inheritance System.Object → ByteSizeExtensions

Methods

ByteSizeExtensions.Bits(this byte) Method

Considers input as bits

public static Humanizer.ByteSize Bits(this byte input);

Parameters

input System.Byte

Returns

ByteSize

ByteSizeExtensions.Bits(this int) Method

Considers input as bits

public static Humanizer.ByteSize Bits(this int input);

Parameters

input System.Int32

Returns

ByteSize

ByteSizeExtensions.Bits(this long) Method

Considers input as bits

public static Humanizer.ByteSize Bits(this long input);

Parameters

input System.Int64

Returns

ByteSize

ByteSizeExtensions.Bits(this sbyte) Method

Considers input as bits

public static Humanizer.ByteSize Bits(this sbyte input);

Parameters

input System.SByte

Returns

ByteSize

ByteSizeExtensions.Bits(this short) Method

Considers input as bits

public static Humanizer.ByteSize Bits(this short input);

Parameters

input System.Int16

Returns

ByteSize

ByteSizeExtensions.Bits(this uint) Method

Considers input as bits

public static Humanizer.ByteSize Bits(this uint input);

Parameters

input System.UInt32

Returns

ByteSize

ByteSizeExtensions.Bits(this ushort) Method

Considers input as bits

public static Humanizer.ByteSize Bits(this ushort input);

Parameters

input System.UInt16

Returns

ByteSize

ByteSizeExtensions.Bytes(this byte) Method

Considers input as bytes

public static Humanizer.ByteSize Bytes(this byte input);

Parameters

input System.Byte

Returns

ByteSize

ByteSizeExtensions.Bytes(this double) Method

Considers input as bytes

public static Humanizer.ByteSize Bytes(this double input);

Parameters

input System.Double

Returns

ByteSize

ByteSizeExtensions.Bytes(this int) Method

Considers input as bytes

public static Humanizer.ByteSize Bytes(this int input);

Parameters

input System.Int32

Returns

ByteSize

ByteSizeExtensions.Bytes(this long) Method

Considers input as bytes

public static Humanizer.ByteSize Bytes(this long input);

Parameters

input System.Int64

Returns

ByteSize

ByteSizeExtensions.Bytes(this sbyte) Method

Considers input as bytes

public static Humanizer.ByteSize Bytes(this sbyte input);

Parameters

input System.SByte

Returns

ByteSize

ByteSizeExtensions.Bytes(this short) Method

Considers input as bytes

public static Humanizer.ByteSize Bytes(this short input);

Parameters

input System.Int16

Returns

ByteSize

ByteSizeExtensions.Bytes(this uint) Method

Considers input as bytes

public static Humanizer.ByteSize Bytes(this uint input);

Parameters

input System.UInt32

Returns

ByteSize

ByteSizeExtensions.Bytes(this ushort) Method

Considers input as bytes

public static Humanizer.ByteSize Bytes(this ushort input);

Parameters

input System.UInt16

Returns

ByteSize

ByteSizeExtensions.Gigabytes(this byte) Method

Considers input as gigabytes

public static Humanizer.ByteSize Gigabytes(this byte input);

Parameters

input System.Byte

Returns

ByteSize

ByteSizeExtensions.Gigabytes(this double) Method

Considers input as gigabytes

public static Humanizer.ByteSize Gigabytes(this double input);

Parameters

input System.Double

Returns

ByteSize

ByteSizeExtensions.Gigabytes(this int) Method

Considers input as gigabytes

public static Humanizer.ByteSize Gigabytes(this int input);

Parameters

input System.Int32

Returns

ByteSize

ByteSizeExtensions.Gigabytes(this long) Method

Considers input as gigabytes

public static Humanizer.ByteSize Gigabytes(this long input);

Parameters

input System.Int64

Returns

ByteSize

ByteSizeExtensions.Gigabytes(this sbyte) Method

Considers input as gigabytes

public static Humanizer.ByteSize Gigabytes(this sbyte input);

Parameters

input System.SByte

Returns

ByteSize

ByteSizeExtensions.Gigabytes(this short) Method

Considers input as gigabytes

public static Humanizer.ByteSize Gigabytes(this short input);

Parameters

input System.Int16

Returns

ByteSize

ByteSizeExtensions.Gigabytes(this uint) Method

Considers input as gigabytes

public static Humanizer.ByteSize Gigabytes(this uint input);

Parameters

input System.UInt32

Returns

ByteSize

ByteSizeExtensions.Gigabytes(this ushort) Method

Considers input as gigabytes

public static Humanizer.ByteSize Gigabytes(this ushort input);

Parameters

input System.UInt16

Returns

ByteSize

ByteSizeExtensions.Humanize(this ByteSize, string) Method

Turns a byte quantity into human readable form, eg 2 GB

public static string Humanize(this Humanizer.ByteSize input, string? format=null);

Parameters

input ByteSize

format System.String

The string format to use

Returns

System.String

ByteSizeExtensions.Humanize(this ByteSize, string, IFormatProvider) Method

Turns a byte quantity into human readable form, eg 2 GB

public static string Humanize(this Humanizer.ByteSize input, string? format, System.IFormatProvider? formatProvider);

Parameters

input ByteSize

format System.String

The string format to use

formatProvider System.IFormatProvider

The format provider to use

Returns

System.String

ByteSizeExtensions.Humanize(this ByteSize, IFormatProvider) Method

Turns a byte quantity into human readable form, eg 2 GB

public static string Humanize(this Humanizer.ByteSize input, System.IFormatProvider formatProvider);

Parameters

input ByteSize

formatProvider System.IFormatProvider

The format provider to use

Returns

System.String

ByteSizeExtensions.Kilobytes(this byte) Method

Considers input as kilobytes

public static Humanizer.ByteSize Kilobytes(this byte input);

Parameters

input System.Byte

Returns

ByteSize

ByteSizeExtensions.Kilobytes(this double) Method

Considers input as kilobytes

public static Humanizer.ByteSize Kilobytes(this double input);

Parameters

input System.Double

Returns

ByteSize

ByteSizeExtensions.Kilobytes(this int) Method

Considers input as kilobytes

public static Humanizer.ByteSize Kilobytes(this int input);

Parameters

input System.Int32

Returns

ByteSize

ByteSizeExtensions.Kilobytes(this long) Method

Considers input as kilobytes

public static Humanizer.ByteSize Kilobytes(this long input);

Parameters

input System.Int64

Returns

ByteSize

ByteSizeExtensions.Kilobytes(this sbyte) Method

Considers input as kilobytes

public static Humanizer.ByteSize Kilobytes(this sbyte input);

Parameters

input System.SByte

Returns

ByteSize

ByteSizeExtensions.Kilobytes(this short) Method

Considers input as kilobytes

public static Humanizer.ByteSize Kilobytes(this short input);

Parameters

input System.Int16

Returns

ByteSize

ByteSizeExtensions.Kilobytes(this uint) Method

Considers input as kilobytes

public static Humanizer.ByteSize Kilobytes(this uint input);

Parameters

input System.UInt32

Returns

ByteSize

ByteSizeExtensions.Kilobytes(this ushort) Method

Considers input as kilobytes

public static Humanizer.ByteSize Kilobytes(this ushort input);

Parameters

input System.UInt16

Returns

ByteSize

ByteSizeExtensions.Megabytes(this byte) Method

Considers input as megabytes

public static Humanizer.ByteSize Megabytes(this byte input);

Parameters

input System.Byte

Returns

ByteSize

ByteSizeExtensions.Megabytes(this double) Method

Considers input as megabytes

public static Humanizer.ByteSize Megabytes(this double input);

Parameters

input System.Double

Returns

ByteSize

ByteSizeExtensions.Megabytes(this int) Method

Considers input as megabytes

public static Humanizer.ByteSize Megabytes(this int input);

Parameters

input System.Int32

Returns

ByteSize

ByteSizeExtensions.Megabytes(this long) Method

Considers input as megabytes

public static Humanizer.ByteSize Megabytes(this long input);

Parameters

input System.Int64

Returns

ByteSize

ByteSizeExtensions.Megabytes(this sbyte) Method

Considers input as megabytes

public static Humanizer.ByteSize Megabytes(this sbyte input);

Parameters

input System.SByte

Returns

ByteSize

ByteSizeExtensions.Megabytes(this short) Method

Considers input as megabytes

public static Humanizer.ByteSize Megabytes(this short input);

Parameters

input System.Int16

Returns

ByteSize

ByteSizeExtensions.Megabytes(this uint) Method

Considers input as megabytes

public static Humanizer.ByteSize Megabytes(this uint input);

Parameters

input System.UInt32

Returns

ByteSize

ByteSizeExtensions.Megabytes(this ushort) Method

Considers input as megabytes

public static Humanizer.ByteSize Megabytes(this ushort input);

Parameters

input System.UInt16

Returns

ByteSize

ByteSizeExtensions.Per(this ByteSize, TimeSpan) Method

Turns a quantity of bytes in a given interval into a rate that can be manipulated

public static Humanizer.ByteRate Per(this Humanizer.ByteSize size, System.TimeSpan interval);

Parameters

size ByteSize

Quantity of bytes

interval System.TimeSpan

Interval to create rate for

Returns

ByteRate

ByteSizeExtensions.Terabytes(this byte) Method

Considers input as terabytes

public static Humanizer.ByteSize Terabytes(this byte input);

Parameters

input System.Byte

Returns

ByteSize

ByteSizeExtensions.Terabytes(this double) Method

Considers input as terabytes

public static Humanizer.ByteSize Terabytes(this double input);

Parameters

input System.Double

Returns

ByteSize

ByteSizeExtensions.Terabytes(this int) Method

Considers input as terabytes

public static Humanizer.ByteSize Terabytes(this int input);

Parameters

input System.Int32

Returns

ByteSize

ByteSizeExtensions.Terabytes(this long) Method

Considers input as terabytes

public static Humanizer.ByteSize Terabytes(this long input);

Parameters

input System.Int64

Returns

ByteSize

ByteSizeExtensions.Terabytes(this sbyte) Method

Considers input as terabytes

public static Humanizer.ByteSize Terabytes(this sbyte input);

Parameters

input System.SByte

Returns

ByteSize

ByteSizeExtensions.Terabytes(this short) Method

Considers input as terabytes

public static Humanizer.ByteSize Terabytes(this short input);

Parameters

input System.Int16

Returns

ByteSize

ByteSizeExtensions.Terabytes(this uint) Method

Considers input as terabytes

public static Humanizer.ByteSize Terabytes(this uint input);

Parameters

input System.UInt32

Returns

ByteSize

ByteSizeExtensions.Terabytes(this ushort) Method

Considers input as terabytes

public static Humanizer.ByteSize Terabytes(this ushort input);

Parameters

input System.UInt16

Returns

ByteSize