Decimal Explicit Conversion (Decimal to UInt64)
.NET Framework (current version)
Defines an explicit conversion of a Decimal to a 64-bit unsigned integer.
This API is not CLS-compliant.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- value
-
Type:
System.Decimal
The value to convert.
| Exception | Condition |
|---|---|
| OverflowException | value is negative or greater than UInt64.MaxValue. |
This operator supports the explicit conversion of a Decimal to a UInt64. The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a Decimal value to a UInt64 value by using C# and Visual Basic. To perform a conversion that is independent of language, you can call the ToUInt64 or the Convert.ToUInt64(Decimal) method.
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: