C# StringBuilder Append(Single)

Description

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

Syntax

StringBuilder.Append(Single) has the following syntax.


public StringBuilder Append(
  float value
)

Parameters

StringBuilder.Append(Single) has the following parameters.

  • value - The value to append.

Returns

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

Example


using System;/*ww w  . j a  va  2 s  .  co  m*/
using System.Text;
using System.Globalization;

class Sample 
{
    public static void Main() 
    {
        float value = 123.47f;
        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