Windows Dev Center

Convert.ToDecimal Method (Boolean)

Converts the value of the specified Boolean value to the equivalent Decimal number.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static decimal ToDecimal(
	bool value


Type: System.Boolean
A Boolean value.

Return Value

Type: System.Decimal
The number 1 if value is true; otherwise, 0.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2015 Microsoft