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
Wiki Markup
{description}
{excerpt}Creates a string for displaying fractions.{excerpt}
{signature:C#}
 public System.String CreateFraction(int numDigits, int denominator)
{signature}{signature: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#}

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

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

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

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

{example}