Message-ID: <1612492874.8189.1711636642336.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8188_509144246.1711636642336" ------=_Part_8188_509144246.1711636642336 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html NumberFormat.CreateCurrency(Int32, Boolean, Boolean, Boolean, Nu= mberFormat.Color)

NumberFormat.CreateCurrency(Int32, Boolean, Boolean, Boolean, Numbe= rFormat.Color)

Description

=20

Creates a format string for displaying currency values.

=20
C#
=20
 public System.String CreateCurrency(int numDecimalPlaces, boolean useDolla=
rSign, boolean useNegativeSign, boolean useParensForNegatives, Color negati=
veColor)
=20
=20
vb.net
=20
Public Function CreateCurrency(ByVal numDecimalPlaces As Integer, ByVal use=
DollarSign As Boolean, ByVal useNegativeSign As Boolean, ByVal useParensFor=
Negatives As Boolean, ByVal negativeColor As Color) As String
=20
=20

Parameters

=20
numDecimalPlaces
The number of decimal = places to display.=20
useDollarSign
If=20 true, the dollar sign will be displayed.=20
useNegativeSign
If=20 true, the negative sign will be used for negative values.=20
useParensForNegatives
If=20 true, negative numbers will be shown in parentheses.=20
negativeColor
A color to use when displayi= ng negative numbers.=20 negativeColor may be null.=20

Returns

A currency format string.=20

Examples

=20
C#
=20

          //--- Create a style.
          Style styl =3D wb.CreateStyle();

          //--- The following assigns the currency string "$#,##0.00;[=
Red]-$#,##0.00"
          //--- to the style.
          styl.NumberFormat =3D
               wb.NumberFormat.CreateCurrency(2,
               true,
               true,
               false,
               NumberFormat.Color.Red);
        
=20
=20
vb.net
=20

          '--- Create a style.
          Dim styl As Style =3D wb.CreateStyle()

          '--- The following assigns the currency string "$#,##0.00;[R=
ed]-$#,##0.00"
          '--- to the style.
          styl.NumberFormat =3D wb.NumberFormat.CreateCurrency(2, _
               True, _
               True, _
               False, _
               NumberFormat.Color.Red)
        
=20
------=_Part_8188_509144246.1711636642336--