lets say I have an array of strings that has 100 elements. Is there a way for me to transfer 50 of those elements to another array of strings without having to use a loop that assigns each element one by one to the the other array?
Printable View
lets say I have an array of strings that has 100 elements. Is there a way for me to transfer 50 of those elements to another array of strings without having to use a loop that assigns each element one by one to the the other array?
Yes. Use:
Array.Copy(sourceArray, 50, destArray, 0, 50);
thanks