Class SizeRoundingBehavior
Rounding behaviour when converting between units of Size
.
Inheritance
System.Object
SizeRoundingBehavior
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class SizeRoundingBehavior : Enum
Syntax (vb)
Public NotInheritable Class SizeRoundingBehavior
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
Size.Mebibytes(2).ToKibibytes(); // yields 2048
Size.Kibibytes(2050).ToMebibytes(new SizeConversionOptions { Rounding = SizeRoundingBehavior.FLOOR });
Synopsis
Fields
FAIL | Fail the conversion if the result is not an integer. |
FLOOR | If the result is not an integer, round it to the closest integer less than the result. |
NONE | Don't round. |
value__ |
Fields
FAIL
Fail the conversion if the result is not an integer.
public const SizeRoundingBehavior FAIL
Field Value
Type | Description |
---|---|
SizeRoundingBehavior |
FLOOR
If the result is not an integer, round it to the closest integer less than the result.
public const SizeRoundingBehavior FLOOR
Field Value
Type | Description |
---|---|
SizeRoundingBehavior |
NONE
Don't round.
public const SizeRoundingBehavior NONE
Field Value
Type | Description |
---|---|
SizeRoundingBehavior |
Remarks
Return even if the result is a fraction.
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |