C# StringBuilder Append(UInt16)

Description

StringBuilder Append(UInt16) Appends the string representation of a specified 16-bit unsigned integer to this instance.

Syntax

StringBuilder.Append(UInt16) has the following syntax.


[CLSCompliantAttribute(false)]
public StringBuilder Append(
  ushort value
)

Parameters

StringBuilder.Append(UInt16) has the following parameters.

  • value - The value to append.

Returns

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

Example


/*from   w w w .java2s.  co  m*/
using System;
using System.Text;
using System.Globalization;

class Sample 
{
    public static void Main() 
    {
        System.Text.StringBuilder sb = new 
                    System.Text.StringBuilder("The range of a 16-bit unsigned integer: ");
        sb.Append(UInt16.MinValue).Append(" to ").Append(UInt16.MaxValue);
        Console.WriteLine(sb);
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding