Enum SizeRoundingBehavior
Rounding behaviour when converting between units of Size
.
public enum SizeRoundingBehavior
Fields
FAIL = 0
Fail the conversion if the result is not an integer.
FLOOR = 1
If the result is not an integer, round it to the closest integer less than the result.
NONE = 2
Don't round.
Examples
Size.Mebibytes(2).ToKibibytes(); // yields 2048
Size.Kibibytes(2050).ToMebibytes(new SizeConversionOptions { Rounding = SizeRoundingBehavior.FLOOR });
Remarks
ExampleMetadata: infused