Spread Windows Forms 17
GrapeCity.CalcEngine Assembly / GrapeCity.CalcEngine Namespace / StringBuilderCache Class / Acquire Method
The capacity.


In This Topic
    Acquire Method
    In This Topic
    Get a string builder to use of a particular size. It can be called any number of times, if a string builder is in the cache then it will be returned and the cache emptied. subsequent calls will return a new string builder.
    Syntax
    'Declaration
     
    
    Public Shared Function Acquire( _
       Optional ByVal capacity As Integer _
    ) As StringBuilder
    'Usage
     
    
    Dim capacity As Integer
    Dim value As StringBuilder
     
    value = StringBuilderCache.Acquire(capacity)
    public static StringBuilder Acquire( 
       int capacity
    )

    Parameters

    capacity
    The capacity.

    Return Value

    A StringBuilder instance is cached in Thread Local Storage and so there is one per thread
    See Also