Skip to content

Conversation

@Alexander882
Copy link

Fixed the ByteSize classes so they now conform to the IEEE 1541 standard, i.e. 1 kilobyte = 1000 bytes instead of 1024 bytes. Also added the IEC prefixes; kibi-, mebi-, gibi-, and tebi-, where 1 kibibyte = 1024 bytes etc. in the same manner as the kilo- prefixes worked before.

Added parsing support for negative byte amounts.

Made TryParse return false instead of throwing an exception when given null or whitespace input, so it works like other TryParse-methods.

Alexander Aalykke added 4 commits October 30, 2016 18:50
…exception on null and empty values, just like other TryParse methods
Added tests &  fixed the double comparison assertions
Corrected the symbol for kibibytes to use a capital K
@MehdiK MehdiK closed this Dec 4, 2017
@MehdiK
Copy link
Collaborator

MehdiK commented Dec 4, 2017

Discussing this on #657

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants