Replies: 1 comment 1 reply
-
Hi, sure. See https://github.com/angularsen/UnitsNet/wiki/String-Formatting. Information.FromBytes(12345)
.ToUnit(InformationUnit.Kilobyte)
.ToString("f3", CultureInfo.GetCultureInfo("en-US")); // "12.345 kB" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good evening
unfortunately, I was not able to find any information about the most basic use case related to Units: Automatic scaling of units / numbers, so that it's human readable.
Example:
Information.FromBytes(12345)
how do we automatically get12.345 kB
?Information.FromBytes(12345000)
how do we automatically get12.345 MB
?So one should not have to find out if one has to call
.Megabytes
, so that the display is well readable for humans.Thanks a lot, kind regards,
Thomas
Beta Was this translation helpful? Give feedback.
All reactions