ByteSize Struct
Represents a byte size value that can be formatted, parsed, and compared. Supports both decimal (kB, MB, GB) and binary (kiB, MiB, GiB) units.
public readonly struct ByteSize : IComparable, IComparable<ByteSize>, IEquatable<ByteSize>, IFormattable, IParsable<ByteSize>, ISpanFormattable, ISpanParsable<ByteSize>, IUtf8SpanFormattable, IUtf8SpanParsable<ByteSize>Example
// Create an instance
var size = new ByteSize(1024);
var size2 = ByteSize.FromKiloBytes(10);
var size3 = ByteSize.Parse("10MB", CultureInfo.InvariantCulture);
Assert.Equal(10_000, size2.Value);
Assert.Equal(10_000_000, size3.Value);
// Format with automatic unit selection
Assert.Equal("1.024kB", size.ToString(CultureInfo.InvariantCulture)); // decimal units
Assert.Equal("1kiB", size.ToString("gi", CultureInfo.InvariantCulture)); // binary units
// Format with specific unit
Assert.Equal("0.001024MB", size.ToString("MB", CultureInfo.InvariantCulture));
// Perform arithmetic operations
var total = ByteSize.FromKiloBytes(1) + ByteSize.FromKiloBytes(2);
Assert.Equal("3kB", total.ToString(CultureInfo.InvariantCulture));- Implements
Constructors
| Name | Description |
|---|---|
| ByteSize(long) | Initializes a new instance of the ByteSize struct with the specified byte value. |
ByteSize(long)
ByteSize.csProperties
| Name | Description |
|---|---|
| MaxValue | Gets a ByteSize instance representing the maximum possible byte value. |
| MinValue | Gets a ByteSize instance representing the minimum possible byte value. |
| Value | Gets the size in bytes. |
| Zero | Gets a ByteSize instance representing zero bytes. |
MaxValue
ByteSize.csMinValue
ByteSize.csValue
ByteSize.csZero
ByteSize.csMethods
| Name | Description |
|---|---|
| Add(ByteSize) | Adds two byte size values. |
| CompareTo(ByteSize) | |
| CompareTo(object?) | |
| Divide(long) | Divides this byte size by a factor. |
| Equals(ByteSize) | |
| Equals(object?) | |
| From(byte, ByteSizeUnit) | Creates a ByteSize instance from a value and unit. |
| From(double, ByteSizeUnit) | Creates a ByteSize instance from a value and unit. |
| From(short, ByteSizeUnit) | Creates a ByteSize instance from a value and unit. |
| From(int, ByteSizeUnit) | Creates a ByteSize instance from a value and unit. |
| From(long, ByteSizeUnit) | Creates a ByteSize instance from a value and unit. |
| From(float, ByteSizeUnit) | Creates a ByteSize instance from a value and unit. |
| FromBytes(byte) | Creates a ByteSize instance from a byte value. |
| FromBytes(double) | Creates a ByteSize instance from a byte value. |
| FromBytes(short) | Creates a ByteSize instance from a byte value. |
| FromBytes(int) | Creates a ByteSize instance from a byte value. |
| FromBytes(long) | Creates a ByteSize instance from a byte value. |
| FromBytes(float) | Creates a ByteSize instance from a byte value. |
| FromExaBytes(byte) | Creates a ByteSize instance from a exabyte value. |
| FromExaBytes(double) | Creates a ByteSize instance from a exabyte value. |
| FromExaBytes(short) | Creates a ByteSize instance from a exabyte value. |
| FromExaBytes(int) | Creates a ByteSize instance from a exabyte value. |
| FromExaBytes(long) | Creates a ByteSize instance from a exabyte value. |
| FromExaBytes(float) | Creates a ByteSize instance from a exabyte value. |
| FromExbiBytes(byte) | Creates a ByteSize instance from a exbibyte value. |
| FromExbiBytes(double) | Creates a ByteSize instance from a exbibyte value. |
| FromExbiBytes(short) | Creates a ByteSize instance from a exbibyte value. |
| FromExbiBytes(int) | Creates a ByteSize instance from a exbibyte value. |
| FromExbiBytes(long) | Creates a ByteSize instance from a exbibyte value. |
| FromExbiBytes(float) | Creates a ByteSize instance from a exbibyte value. |
| FromFileLength(FileInfo) | Creates a ByteSize instance from a file's length. |
| FromFileLength(string) | Creates a ByteSize instance from a file's length. |
| FromGibiBytes(byte) | Creates a ByteSize instance from a gibibyte value. |
| FromGibiBytes(double) | Creates a ByteSize instance from a gibibyte value. |
| FromGibiBytes(short) | Creates a ByteSize instance from a gibibyte value. |
| FromGibiBytes(int) | Creates a ByteSize instance from a gibibyte value. |
| FromGibiBytes(long) | Creates a ByteSize instance from a gibibyte value. |
| FromGibiBytes(float) | Creates a ByteSize instance from a gibibyte value. |
| FromGigaBytes(byte) | Creates a ByteSize instance from a gigabyte value. |
| FromGigaBytes(double) | Creates a ByteSize instance from a gigabyte value. |
| FromGigaBytes(short) | Creates a ByteSize instance from a gigabyte value. |
| FromGigaBytes(int) | Creates a ByteSize instance from a gigabyte value. |
| FromGigaBytes(long) | Creates a ByteSize instance from a gigabyte value. |
| FromGigaBytes(float) | Creates a ByteSize instance from a gigabyte value. |
| FromKibiBytes(byte) | Creates a ByteSize instance from a kibibyte value. |
| FromKibiBytes(double) | Creates a ByteSize instance from a kibibyte value. |
| FromKibiBytes(short) | Creates a ByteSize instance from a kibibyte value. |
| FromKibiBytes(int) | Creates a ByteSize instance from a kibibyte value. |
| FromKibiBytes(long) | Creates a ByteSize instance from a kibibyte value. |
| FromKibiBytes(float) | Creates a ByteSize instance from a kibibyte value. |
| FromKiloBytes(byte) | Creates a ByteSize instance from a kilobyte value. |
| FromKiloBytes(double) | Creates a ByteSize instance from a kilobyte value. |
| FromKiloBytes(short) | Creates a ByteSize instance from a kilobyte value. |
| FromKiloBytes(int) | Creates a ByteSize instance from a kilobyte value. |
| FromKiloBytes(long) | Creates a ByteSize instance from a kilobyte value. |
| FromKiloBytes(float) | Creates a ByteSize instance from a kilobyte value. |
| FromMebiBytes(byte) | Creates a ByteSize instance from a mebibyte value. |
| FromMebiBytes(double) | Creates a ByteSize instance from a mebibyte value. |
| FromMebiBytes(short) | Creates a ByteSize instance from a mebibyte value. |
| FromMebiBytes(int) | Creates a ByteSize instance from a mebibyte value. |
| FromMebiBytes(long) | Creates a ByteSize instance from a mebibyte value. |
| FromMebiBytes(float) | Creates a ByteSize instance from a mebibyte value. |
| FromMegaBytes(byte) | Creates a ByteSize instance from a megabyte value. |
| FromMegaBytes(double) | Creates a ByteSize instance from a megabyte value. |
| FromMegaBytes(short) | Creates a ByteSize instance from a megabyte value. |
| FromMegaBytes(int) | Creates a ByteSize instance from a megabyte value. |
| FromMegaBytes(long) | Creates a ByteSize instance from a megabyte value. |
| FromMegaBytes(float) | Creates a ByteSize instance from a megabyte value. |
| FromPebiBytes(byte) | Creates a ByteSize instance from a pebibyte value. |
| FromPebiBytes(double) | Creates a ByteSize instance from a pebibyte value. |
| FromPebiBytes(short) | Creates a ByteSize instance from a pebibyte value. |
| FromPebiBytes(int) | Creates a ByteSize instance from a pebibyte value. |
| FromPebiBytes(long) | Creates a ByteSize instance from a pebibyte value. |
| FromPebiBytes(float) | Creates a ByteSize instance from a pebibyte value. |
| FromPetaBytes(byte) | Creates a ByteSize instance from a petabyte value. |
| FromPetaBytes(double) | Creates a ByteSize instance from a petabyte value. |
| FromPetaBytes(short) | Creates a ByteSize instance from a petabyte value. |
| FromPetaBytes(int) | Creates a ByteSize instance from a petabyte value. |
| FromPetaBytes(long) | Creates a ByteSize instance from a petabyte value. |
| FromPetaBytes(float) | Creates a ByteSize instance from a petabyte value. |
| FromTebiBytes(byte) | Creates a ByteSize instance from a tebibyte value. |
| FromTebiBytes(double) | Creates a ByteSize instance from a tebibyte value. |
| FromTebiBytes(short) | Creates a ByteSize instance from a tebibyte value. |
| FromTebiBytes(int) | Creates a ByteSize instance from a tebibyte value. |
| FromTebiBytes(long) | Creates a ByteSize instance from a tebibyte value. |
| FromTebiBytes(float) | Creates a ByteSize instance from a tebibyte value. |
| FromTeraBytes(byte) | Creates a ByteSize instance from a terabyte value. |
| FromTeraBytes(double) | Creates a ByteSize instance from a terabyte value. |
| FromTeraBytes(short) | Creates a ByteSize instance from a terabyte value. |
| FromTeraBytes(int) | Creates a ByteSize instance from a terabyte value. |
| FromTeraBytes(long) | Creates a ByteSize instance from a terabyte value. |
| FromTeraBytes(float) | Creates a ByteSize instance from a terabyte value. |
| GetHashCode() | |
| GetValue(ByteSizeUnit) | Converts the byte size to the specified unit. |
| Multiply(long) | Scales this byte size by a factor. |
| Parse(ReadOnlySpan<byte>) | Parses a span of UTF-8 characters into a ByteSize value. |
| Parse(ReadOnlySpan<char>, IFormatProvider?) | Parses a span of characters into a ByteSize value. |
| Parse(string, IFormatProvider?) | Converts the string representation of a byte size to its ByteSize equivalent. |
| Subtract(ByteSize) | Subtracts a byte size value from this instance. |
| ToString() | |
| ToString(ByteSizeUnit) | |
| ToString(ByteSizeUnit, IFormatProvider?) | |
| ToString(IFormatProvider?) | |
| ToString(string?) | Convert value to string |
| ToString(string?, IFormatProvider?) | Convert value to string |
| TryFormat(Span<byte>, int, ReadOnlySpan<char>, IFormatProvider?) | Tries to format the value as UTF-8 into the provided span of bytes. |
| TryFormat(Span<char>, int, ReadOnlySpan<char>, IFormatProvider?) | Tries to format the value into the provided span of characters. |
| TryParse(ReadOnlySpan<byte>, ByteSize) | Tries to parse a span of UTF-8 characters into a ByteSize value. |
| TryParse(ReadOnlySpan<char>, IFormatProvider?, ByteSize) | Tries to parse a span of characters into a ByteSize value. |
| TryParse(string, ByteSize) | Tries to convert the string representation of a byte size to its ByteSize equivalent. |
| TryParse(string?, IFormatProvider?, ByteSize) | Tries to convert the string representation of a byte size to its ByteSize equivalent. |
Add(ByteSize)
ByteSize.csDivide(long)
ByteSize.csFrom overloads
From(byte, ByteSizeUnit)
ByteSize.csCreates a ByteSize instance from a value and unit.
public static ByteSize From(byte value, ByteSizeUnit unit)Parameters
valuebyte- The numeric value.
unitByteSizeUnit- The unit of the value.
Returns
ByteSize A ByteSize instance representing the specified value and unit.
From(double, ByteSizeUnit)
ByteSize.csCreates a ByteSize instance from a value and unit.
public static ByteSize From(double value, ByteSizeUnit unit)Parameters
valuedouble- The numeric value.
unitByteSizeUnit- The unit of the value.
Returns
ByteSize A ByteSize instance representing the specified value and unit.
From(short, ByteSizeUnit)
ByteSize.csCreates a ByteSize instance from a value and unit.
public static ByteSize From(short value, ByteSizeUnit unit)Parameters
valueshort- The numeric value.
unitByteSizeUnit- The unit of the value.
Returns
ByteSize A ByteSize instance representing the specified value and unit.
From(int, ByteSizeUnit)
ByteSize.csCreates a ByteSize instance from a value and unit.
public static ByteSize From(int value, ByteSizeUnit unit)Parameters
valueint- The numeric value.
unitByteSizeUnit- The unit of the value.
Returns
ByteSize A ByteSize instance representing the specified value and unit.
From(long, ByteSizeUnit)
ByteSize.csCreates a ByteSize instance from a value and unit.
public static ByteSize From(long value, ByteSizeUnit unit)Parameters
valuelong- The numeric value.
unitByteSizeUnit- The unit of the value.
Returns
ByteSize A ByteSize instance representing the specified value and unit.
From(float, ByteSizeUnit)
ByteSize.csCreates a ByteSize instance from a value and unit.
public static ByteSize From(float value, ByteSizeUnit unit)Parameters
valuefloat- The numeric value.
unitByteSizeUnit- The unit of the value.
Returns
ByteSize A ByteSize instance representing the specified value and unit.
FromBytes overloads
FromBytes(byte)
ByteSize.Generated.csFromBytes(double)
ByteSize.Generated.csFromBytes(short)
ByteSize.Generated.csFromBytes(int)
ByteSize.Generated.csFromBytes(long)
ByteSize.Generated.csFromBytes(float)
ByteSize.Generated.csFromExaBytes overloads
FromExaBytes(byte)
ByteSize.Generated.csFromExaBytes(double)
ByteSize.Generated.csFromExaBytes(short)
ByteSize.Generated.csFromExaBytes(int)
ByteSize.Generated.csFromExaBytes(long)
ByteSize.Generated.csFromExaBytes(float)
ByteSize.Generated.csFromExbiBytes overloads
FromExbiBytes(byte)
ByteSize.Generated.csFromExbiBytes(double)
ByteSize.Generated.csFromExbiBytes(short)
ByteSize.Generated.csFromExbiBytes(int)
ByteSize.Generated.csFromExbiBytes(long)
ByteSize.Generated.csFromExbiBytes(float)
ByteSize.Generated.csFromGibiBytes overloads
FromGibiBytes(byte)
ByteSize.Generated.csFromGibiBytes(double)
ByteSize.Generated.csFromGibiBytes(short)
ByteSize.Generated.csFromGibiBytes(int)
ByteSize.Generated.csFromGibiBytes(long)
ByteSize.Generated.csFromGibiBytes(float)
ByteSize.Generated.csFromGigaBytes overloads
FromGigaBytes(byte)
ByteSize.Generated.csFromGigaBytes(double)
ByteSize.Generated.csFromGigaBytes(short)
ByteSize.Generated.csFromGigaBytes(int)
ByteSize.Generated.csFromGigaBytes(long)
ByteSize.Generated.csFromGigaBytes(float)
ByteSize.Generated.csFromKibiBytes overloads
FromKibiBytes(byte)
ByteSize.Generated.csFromKibiBytes(double)
ByteSize.Generated.csFromKibiBytes(short)
ByteSize.Generated.csFromKibiBytes(int)
ByteSize.Generated.csFromKibiBytes(long)
ByteSize.Generated.csFromKibiBytes(float)
ByteSize.Generated.csFromKiloBytes overloads
FromKiloBytes(byte)
ByteSize.Generated.csFromKiloBytes(double)
ByteSize.Generated.csFromKiloBytes(short)
ByteSize.Generated.csFromKiloBytes(int)
ByteSize.Generated.csFromKiloBytes(long)
ByteSize.Generated.csFromKiloBytes(float)
ByteSize.Generated.csFromMebiBytes overloads
FromMebiBytes(byte)
ByteSize.Generated.csFromMebiBytes(double)
ByteSize.Generated.csFromMebiBytes(short)
ByteSize.Generated.csFromMebiBytes(int)
ByteSize.Generated.csFromMebiBytes(long)
ByteSize.Generated.csFromMebiBytes(float)
ByteSize.Generated.csFromMegaBytes overloads
FromMegaBytes(byte)
ByteSize.Generated.csFromMegaBytes(double)
ByteSize.Generated.csFromMegaBytes(short)
ByteSize.Generated.csFromMegaBytes(int)
ByteSize.Generated.csFromMegaBytes(long)
ByteSize.Generated.csFromMegaBytes(float)
ByteSize.Generated.csFromPebiBytes overloads
FromPebiBytes(byte)
ByteSize.Generated.csFromPebiBytes(double)
ByteSize.Generated.csFromPebiBytes(short)
ByteSize.Generated.csFromPebiBytes(int)
ByteSize.Generated.csFromPebiBytes(long)
ByteSize.Generated.csFromPebiBytes(float)
ByteSize.Generated.csFromPetaBytes overloads
FromPetaBytes(byte)
ByteSize.Generated.csFromPetaBytes(double)
ByteSize.Generated.csFromPetaBytes(short)
ByteSize.Generated.csFromPetaBytes(int)
ByteSize.Generated.csFromPetaBytes(long)
ByteSize.Generated.csFromPetaBytes(float)
ByteSize.Generated.csFromTebiBytes overloads
FromTebiBytes(byte)
ByteSize.Generated.csFromTebiBytes(double)
ByteSize.Generated.csFromTebiBytes(short)
ByteSize.Generated.csFromTebiBytes(int)
ByteSize.Generated.csFromTebiBytes(long)
ByteSize.Generated.csFromTebiBytes(float)
ByteSize.Generated.csFromTeraBytes overloads
FromTeraBytes(byte)
ByteSize.Generated.csFromTeraBytes(double)
ByteSize.Generated.csFromTeraBytes(short)
ByteSize.Generated.csFromTeraBytes(int)
ByteSize.Generated.csFromTeraBytes(long)
ByteSize.Generated.csFromTeraBytes(float)
ByteSize.Generated.csGetHashCode()
ByteSize.csGetValue(ByteSizeUnit)
ByteSize.csConverts the byte size to the specified unit.
public double GetValue(ByteSizeUnit unit)Multiply(long)
ByteSize.csParse overloads
Parse(ReadOnlySpan<byte>)
ByteSize.csParses a span of UTF-8 characters into a ByteSize value.
public static ByteSize Parse(ReadOnlySpan<byte> utf8Text)Parameters
utf8TextReadOnlySpan<byte>- The span of UTF-8 characters to parse.
Returns
ByteSize The result of parsing utf8Text.
Exceptions
FormatException- utf8Text is not in the correct format.
Parse(ReadOnlySpan<char>, IFormatProvider?)
ByteSize.csParses a span of characters into a ByteSize value.
public static ByteSize Parse(ReadOnlySpan<char> s, IFormatProvider? provider)Parameters
sReadOnlySpan<char>- The span of characters to parse.
providerIFormatProvider?- An object that provides culture-specific formatting information about s.
Returns
ByteSize The result of parsing s.
Exceptions
FormatException- s is not in the correct format.
Parse(string, IFormatProvider?)
ByteSize.csConverts the string representation of a byte size to its ByteSize equivalent.
public static ByteSize Parse(string text, IFormatProvider? formatProvider)Parameters
textstring- A string containing a byte size to convert.
formatProviderIFormatProvider?- An object that supplies culture-specific formatting information.
Returns
ByteSize A ByteSize equivalent to the byte size specified in text.
Exceptions
FormatExceptiontextis not in a valid format.
Subtract(ByteSize)
ByteSize.csToString overloads
ToString()
ByteSize.csToString(ByteSizeUnit)
ByteSize.cspublic string ToString(ByteSizeUnit unit)No documentation is available.
ToString(ByteSizeUnit, IFormatProvider?)
ByteSize.cspublic string ToString(ByteSizeUnit unit, IFormatProvider? formatProvider)No documentation is available.
ToString(IFormatProvider?)
ByteSize.cspublic string ToString(IFormatProvider? formatProvider)No documentation is available.
ToString(string?)
ByteSize.csConvert value to string
Parameters
formatstring?- Allowed formats:
G: Find the best unit (B, kB, MB, GB, etc.), and use G format for the valueG2: Find the best unit (B, kB, MB, GB, etc.), and use F2 format for the valueGi: Find the best unit (B, kiB, MiB, GiB, etc.), and use G format for the valueGi2: Find the best unit (B, kiB, MiB, GiB, etc.), and use F2 format for the valueF,F2,Fi,Fi2: Synonyms ofG,G2,Gi,Gi2B,kB,kiB,MB,MiB,GB,GiB,TB,TiB,PB,PiB,EB,EiB: Use the provided unit, and use G format for the value. If a number is provided (e.g.kB3), it use Fn (e.g. F3) format to convert the value to string.
Returns
Exceptions
FormatException- The provided format is not valid
ToString(string?, IFormatProvider?)
ByteSize.csConvert value to string
public string ToString(string? format, IFormatProvider? formatProvider)Parameters
formatstring?- Allowed formats:
G: Find the best unit (B, kB, MB, GB, etc.), and use G format for the valueG2: Find the best unit (B, kB, MB, GB, etc.), and use F2 format for the valueGi: Find the best unit (B, kiB, MiB, GiB, etc.), and use G format for the valueGi2: Find the best unit (B, kiB, MiB, GiB, etc.), and use F2 format for the valueF,F2,Fi,Fi2: Synonyms ofG,G2,Gi,Gi2B,kB,kiB,MB,MiB,GB,GiB,TB,TiB,PB,PiB,EB,EiB: Use the provided unit, and use G format for the value. If a number is provided (e.g.kB3), it use Fn (e.g. F3) format to convert the value to string.
formatProviderIFormatProvider?
Returns
Exceptions
FormatException- The provided format is not valid
TryFormat overloads
TryFormat(Span<byte>, int, ReadOnlySpan<char>, IFormatProvider?)
ByteSize.csTries to format the value as UTF-8 into the provided span of bytes.
public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider)Parameters
utf8DestinationSpan<byte>- The span in which to write this instance's value formatted as UTF-8.
bytesWrittenint- When this method returns, contains the number of bytes that were written in utf8Destination.
formatReadOnlySpan<char>- A span containing the characters that represent a standard or custom format string.
providerIFormatProvider?- An optional object that supplies culture-specific formatting information.
Returns
bool true if the formatting was successful; otherwise, false.
TryFormat(Span<char>, int, ReadOnlySpan<char>, IFormatProvider?)
ByteSize.csTries to format the value into the provided span of characters.
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)Parameters
destinationSpan<char>- The span in which to write this instance's value formatted as a span of characters.
charsWrittenint- When this method returns, contains the number of characters that were written in destination.
formatReadOnlySpan<char>- A span containing the characters that represent a standard or custom format string.
providerIFormatProvider?- An optional object that supplies culture-specific formatting information for destination.
Returns
bool true if the formatting was successful; otherwise, false.
TryParse overloads
TryParse(ReadOnlySpan<byte>, ByteSize)
ByteSize.csTries to parse a span of UTF-8 characters into a ByteSize value.
public static bool TryParse(ReadOnlySpan<byte> utf8Text, out ByteSize result)Parameters
utf8TextReadOnlySpan<byte>- The span of UTF-8 characters to parse.
resultByteSize- When this method returns, contains the result of successfully parsing utf8Text, or an undefined value on failure.
Returns
bool true if utf8Text was successfully parsed; otherwise, false.
TryParse(ReadOnlySpan<char>, IFormatProvider?, ByteSize)
ByteSize.csTries to parse a span of characters into a ByteSize value.
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out ByteSize result)Parameters
sReadOnlySpan<char>- The span of characters to parse.
providerIFormatProvider?- An object that provides culture-specific formatting information about s.
resultByteSize- When this method returns, contains the result of successfully parsing s, or an undefined value on failure.
Returns
bool true if s was successfully parsed; otherwise, false.
TryParse(string, ByteSize)
ByteSize.csTries to convert the string representation of a byte size to its ByteSize equivalent.
Parameters
textstring- A string containing a byte size to convert.
resultByteSize- When this method returns, contains the
ByteSizeequivalent to the byte size specified intext, if the conversion succeeded, or zero if the conversion failed.
Returns
bool true if text was converted successfully; otherwise, false.
TryParse(string?, IFormatProvider?, ByteSize)
ByteSize.csTries to convert the string representation of a byte size to its ByteSize equivalent.
public static bool TryParse(string? text, IFormatProvider? formatProvider, out ByteSize result)Parameters
textstring?- A string containing a byte size to convert.
formatProviderIFormatProvider?- An object that supplies culture-specific formatting information.
resultByteSize- When this method returns, contains the
ByteSizeequivalent to the byte size specified intext, if the conversion succeeded, or zero if the conversion failed.
Returns
bool true if text was converted successfully; otherwise, false.
Operators
| Name | Description |
|---|---|
| operator +(ByteSize, ByteSize) | |
| operator /(ByteSize, long) | Divides a byte size by a factor. |
| operator ==(ByteSize, ByteSize) | |
| operator >(ByteSize, ByteSize) | |
| operator >=(ByteSize, ByteSize) | |
| implicit operator ByteSize(long) | |
| operator !=(ByteSize, ByteSize) | |
| operator <(ByteSize, ByteSize) | |
| operator <=(ByteSize, ByteSize) | |
| operator *(ByteSize, long) | Scales a byte size by a factor. |
| operator *(long, ByteSize) | Scales a byte size by a factor. |
| operator -(ByteSize, ByteSize) |