Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Capacity

int System.Text.StringBuilder.Capacity
getset

Definition at line 327 of file StringBuilder.cs.

328 {
329 get
330 {
332 }
333 set
334 {
335 if (value < 0)
336 {
337 throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_NegativeCapacity);
338 }
339 if (value > MaxCapacity)
340 {
341 throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_Capacity);
342 }
343 if (value < Length)
344 {
345 throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_SmallCapacity);
346 }
347 if (Capacity != value)
348 {
349 int length = value - m_ChunkOffset;
350 char[] array = GC.AllocateUninitializedArray<char>(length);
353 }
354 }
355 }

Referenced by System.Text.StringBuilderCache.Acquire(), ReLogic.Text.WrappedTextBuilder.Append(), System.StubHelpers.AsAnyMarshaler.ConvertStringBuilderToNative(), System.Text.StringBuilder.EnsureCapacity(), System.Reflection.Internal.PooledStringBuilder.Free(), System.Text.StringBuilder.GetObjectData(), System.Text.StringBuilder.GetReplaceBufferCapacity(), and System.Text.StringBuilderCache.Release().