'Declaration Public Shared Function FormatCurrency( _ ByVal expression As Object, _ Optional ByVal numDigitsAfterDecimal As Integer, _ Optional ByVal includeLeadingDigit As TriState, _ Optional ByVal useParensForNegativeNumbers As TriState, _ Optional ByVal groupDigits As TriState _ ) As String
public static string FormatCurrency( object expression, int numDigitsAfterDecimal, TriState includeLeadingDigit, TriState useParensForNegativeNumbers, TriState groupDigits )
Parameters
- expression
- Required. Expression to be formatted.
- numDigitsAfterDecimal
- Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is –1, which indicates that the computer's regional settings are used.
- includeLeadingDigit
- Optional. TriState enumeration that indicates whether or not a leading zero is displayed for fractional values. See "Settings" for values.
- useParensForNegativeNumbers
- Optional. TriState enumeration that indicates whether or not to place negative values within parentheses. See "Settings" for values.
- groupDigits
- Optional. TriState enumeration that indicates whether or not numbers are grouped using the group delimiter specified in the computer's regional settings. See "Settings" for values.
Return Value
Returns an expression formatted as a currency value using the currency symbol defined in the system control panel.