Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Creates a string for displaying fractions.

Signature
C#
C#
 public System.String CreateFraction(int numDigits, int denominator)
{signature}{signature:
}
Signature
vb.net
vb.net
Public Function CreateFraction(ByVal numDigits As Integer, ByVal denominator As Integer) As String
{signature}
{parameters}
{param:numDigits}The number of digits to display.{param}
{param:denominator}The value to use as denominator.{param}
{returns}A fraction format string.{returns}
{example}{code:csharp|title=C#}
Parameters
Param
numDigits
numDigits

The number of digits to display.

Param
denominator
denominator

The value to use as denominator.

Returns

A fraction format string.

Example
Code Block
csharp
csharp
titleC#


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

          //--- Create the fraction format "# ??/10".
          styl.NumberFormat = wb.NumberFormat.CreateFraction(2, 10);
        
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}


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

          '--- Create the fraction format "# ??/10".
          styl.NumberFormat = wb.NumberFormat.CreateFraction(2, 10)
        
{code} {example}