public static ArrayList Repeat(Object value, int count)
{
if (count < 0)
throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
Contract.Ensures(Contract.Result<ArrayList>() != null);
Contract.EndContractBlock();
ArrayList list = new ArrayList((count > _defaultCapacity) ? count : _defaultCapacity);
for (int i = 0; i < count; i++)
list.Add(value);
return list;
}