Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

Creates an accounting format string.

Signature
C#C#
Wiki Markup
{description}
{excerpt}Creates an accounting format string.{excerpt}
{signature:C#}
 public System.String CreateAccounting(int numDecimalPlaces, boolean useDollarSign, Color negativeColor)
Signature
{signature}{signature:vb.net
vb.net
}
Public Function CreateAccounting(ByVal numDecimalPlaces As Integer, ByVal useDollarSign As Boolean, ByVal negativeColor As Color) As String
Parameters

...

The number of decimal places to display.

...

If true, the dollar sign will be displayed.

...

A color to use when displaying negative numbers. negativeColor may be null.

Returns

An accounting format string.

{signature}
{parameters}
{param:numDecimalPlaces}The number of decimal places to display.{param}
{param:useDollarSign}If {{true}}, the dollar sign will be displayed.{param}
{param:negativeColor}A color to use when displaying negative numbers.  {{negativeColor}} may be null.{param}
{returns}An accounting format string.{returns}
{example}{code:csharp|title=C#}

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

          //--- The following creates the format
          //--- "_($* #,##0.00_);[Green]_($* #,##0.00_);_(* \"-\"_);_(@_)"
          styl.NumberFormat = wb.NumberFormat.CreateAccounting(2,
               true,
               NumberFormat.Color.Green);
        
{code}
{code:vb.net
|title=vb.net
}

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

          '--- The following creates the format
          '--- "_($* #,##0.00_);[Green]_($* #,##0.00_);_(* \"-\"_);_(@_)"
          styl.NumberFormat = wb.NumberFormat.CreateAccounting(2, _
               True, _
               NumberFormat.Color.Green)
        {code}

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle