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

◆ ToArray()

virtual ? object[] System.Collections.Stack.ToArray ( )
inlinevirtual

Reimplemented in System.Collections.Stack.SyncStack, and System.Diagnostics.CorrelationManager.AsyncLocalStackWrapper.

Definition at line 378 of file Stack.cs.

379 {
380 if (_size == 0)
381 {
382 return Array.Empty<object>();
383 }
384 object[] array = new object[_size];
385 for (int i = 0; i < _size; i++)
386 {
387 array[i] = _array[_size - i - 1];
388 }
389 return array;
390 }

References System.Collections.Stack._array, System.Collections.Stack._size, and System.array.

Referenced by System.Collections.Stack.SyncStack.ToArray().