System.CodeDom.Tests.TempFileCollectionTests.AddToCollection C# (CSharp) Method

AddToCollection() protected method

protected AddToCollection ( ICollection collection, int numberOfItemsToAdd ) : void
collection ICollection
numberOfItemsToAdd int
return void
        protected override void AddToCollection(ICollection collection, int numberOfItemsToAdd)
        {
            Random random = new Random(numberOfItemsToAdd);
            for (int i = 0; i < numberOfItemsToAdd; i++)
            {
                ((TempFileCollection)collection).AddFile(random.Next().ToString(), keepFile: true);
            }
        }