SerializationWriterPreserveDecimalScale Property |
Gets or Sets a boolean flag to indicate whether to preserve the scale within
a Decimal value when it would have no effect on the represented value.
Note: a 2m value and a 2.00m value represent the same value but internally they
are stored differently - the former has a value of 2 and a scale of 0 and
the latter has a value of 200 and a scale of 2.
The scaling factor also preserves any trailing zeroes in a Decimal number.
Trailing zeroes do not affect the value of a Decimal number in arithmetic or
comparison operations. However, trailing zeroes can be revealed by the ToString
method if an appropriate format string is applied.
From a serialization point of view, the former will take 2 bytes whereas the
latter would take 4 bytes, therefore it is preferable to not save the scale where
it doesn't affect the represented value.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.2.0.0 (5.2.17.0403)
Syntax public bool PreserveDecimalScale { get; set; }
Public Property PreserveDecimalScale As Boolean
Get
Set
Property Value
Type:
BooleanSee Also