using System.Collections.Generic; namespace Jellyfin.Extensions { /// /// Provides CopyTo extensions methods for . /// public static class CopyToExtensions { /// /// Copies all the elements of the current collection to the specified list /// starting at the specified destination array index. The index is specified as a 32-bit integer. /// /// The current collection that is the source of the elements. /// The list that is the destination of the elements copied from the current collection. /// A 32-bit integer that represents the index in destination at which copying begins. /// The type of the array. public static void CopyTo(this IReadOnlyList source, IList destination, int index = 0) { for (int i = 0; i < source.Count; i++) { destination[index + i] = source[i]; } } } }