C# StringBuilder StringBuilder()

Description

StringBuilder StringBuilder() Initializes a new instance of the StringBuilder class.

Syntax

StringBuilder.StringBuilder() has the following syntax.


public StringBuilder()

Example


using System;//from   w  w  w .  j  av a2s . c  om
using System.Text;

class Sample 
{
    public static void Main() 
    {
        StringBuilder sb1 = new StringBuilder();
        Console.WriteLine(sb1.Capacity);
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding