C# StringBuilder MaxCapacity

Description

StringBuilder MaxCapacity Gets the maximum capacity of this instance.

Syntax

StringBuilder.MaxCapacity has the following syntax.


public int MaxCapacity { get; }

Example


using System;/* www. j  a  va  2s . c om*/
using System.Text;

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

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding