System.Threading.Timer.Scheduler.ShrinkIfNeeded C# (CSharp) Method

ShrinkIfNeeded() static private method

static private ShrinkIfNeeded ( ArrayList list, int initial ) : void
list System.Collections.ArrayList
initial int
return void
			void ShrinkIfNeeded (ArrayList list, int initial)
			{
				int capacity = list.Capacity;
				int count = list.Count;
				if (capacity > initial && count > 0 && (capacity / count) > 3)
					list.Capacity = count * 2;
			}