what's best proceed copy/fill infinite array smaller array c#?


i have infinite int[] array many smaller int[] array. i wish fill adult infinite array values little array, repeat duplicating little array infinite array until full (so large[0] = large[13] = large[26] ... = small[0] etc.). i already have rudimentary method:



int isource = 0;
for (int i = 0; i < destarray.length; i++)
{
(isource >= sourcearray.length)
{
isource = 0; // reset during finish source
}
destarray[i] = sourcearray[isource++];
}


but i need something some-more elegant, hopefully faster.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?