CopyTo() публичный Метод

public CopyTo ( ITimePeriod array, int arrayIndex ) : void
array ITimePeriod
arrayIndex int
Результат void
        public void CopyToTest()
        {
            DateTime now = ClockProxy.Clock.Now;
            SchoolDay schoolDay = new SchoolDay( now );
            TimePeriodCollection timePeriods = new TimePeriodCollection( schoolDay );

            ITimePeriod[] array = new ITimePeriod[ schoolDay.Count ];
            timePeriods.CopyTo( array, 0 );
            Assert.AreEqual( array[ 0 ], schoolDay.Lesson1 );
            Assert.AreEqual( array[ 1 ], schoolDay.Break1 );
            Assert.AreEqual( array[ 2 ], schoolDay.Lesson2 );
            Assert.AreEqual( array[ 3 ], schoolDay.Break2 );
            Assert.AreEqual( array[ 4 ], schoolDay.Lesson3 );
            Assert.AreEqual( array[ 5 ], schoolDay.Break3 );
            Assert.AreEqual( array[ 6 ], schoolDay.Lesson4 );
        }