Spread WinForms 15
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 stringbuilder is in the cache then it will be returned and the cache emptied. subsequent calls will return a new stringbuilder.
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)

Parameters

capacity
The capacity.

Return Value

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