Sisk

Class

SizeHelper

Namespace
Sisk.Core.Helpers
Assembly
Sisk.Core.dll

Provides useful size-dedicated helper members.

C#
public sealed class SizeHelper

Inheritance #

object ← SizeHelper

Inherited Members #

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors #

NameDescription
SizeHelper()

Fields #

NameDescription
UnitEbRepresents the number of bytes in one exibibyte (EiB). This is calculated as 1024 pebibytes.
UnitGbRepresents the number of bytes in one gibibyte (GiB). This is calculated as 1024 mebibytes.
UnitKbRepresents the number of bytes in one kibibyte (KiB). This is calculated as 1024 bytes.
UnitMbRepresents the number of bytes in one mebibyte (MiB). This is calculated as 1024 kibibytes.
UnitPbRepresents the number of bytes in one pebibyte (PiB). This is calculated as 1024 tebibytes.
UnitTbRepresents the number of bytes in one tebibyte (TiB). This is calculated as 1024 gibibytes.

Methods #

NameDescription
HumanReadableSize(long)Converts a byte count into a human-readable string representation.
HumanReadableSize(double)Converts a byte count into a human-readable string representation.
Parse(string)Parses a human-readable size string (e.g., “10 KB”, “2.5 MB”) into a long representing the number of bytes.

Type to search the documentation and the API reference.