C
cody
Hi folks, I had a look into the source code of the Enqueue(T item)
method of the generic Queue class in the .NET framework.
public void Enqueue(T item)
{
if (this._size == this._array.Length)
{
int capacity = (int) ((this._array.Length * 200L) / 100L);
..
isn't the last line the same as "int capacity = _array.Length * 2" ?
Did I miss something?
method of the generic Queue class in the .NET framework.
public void Enqueue(T item)
{
if (this._size == this._array.Length)
{
int capacity = (int) ((this._array.Length * 200L) / 100L);
..
isn't the last line the same as "int capacity = _array.Length * 2" ?
Did I miss something?