Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Initializes a new instance of Decimal to the value of the specified single-precision floating-point number.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Sub New ( _
value As Single _
)
public Decimal(
float value
)
public:
Decimal(
float value
)
new :
value:float32 -> Decimal
public function decimal(
value : float
)
Parameters
- value
Type: System. . :: . .Single
The value to represent as a Decimal.
Remarks
This constructor rounds value to 7 significant digits using rounding to nearest. This is done even if the number has more than 7 digits and the less significant digits are zero.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.