C# StringBuilder Append(Double)

Description

StringBuilder Append(Double) Appends the string representation of a specified double-precision floating-point number to this instance.

Syntax

StringBuilder.Append(Double) has the following syntax.


public StringBuilder Append(
  double value
)

Parameters

StringBuilder.Append(Double) has the following parameters.

  • value - The value to append.

Returns

StringBuilder.Append(Double) method returns A reference to this instance after the append operation has completed.

Example

Appends the string representation of a specified double-precision floating-point number to this instance.


//  w w w . j ava  2s.  co  m

using System;
using System.Text;

class Sample 
{
    public static void Main() 
    {
        double value = 123123.47;
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append('*', 5).Append(value).Append('*', 5);
        Console.WriteLine(sb);
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding