Method
SizeHelper.Parse
Parse(string) #
Parses a human-readable size string (e.g., “10 KB”, “2.5 MB”) into a long representing the number of bytes.
public static long Parse(string humanReadableSize)Parameters #
humanReadableSize string
The human-readable size string to parse.
Returns #
The size in bytes, represented as a long.
Exceptions #
Thrown if humanReadableSize is null or whitespace.
Thrown if humanReadableSize is not in a valid format.