Click here to Skip to main content
16,016,134 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
can anyone tell me how can i assign one array element to another.?
eg. one array a(2)(2) and b(2) elements to another array c(2)(3), array b() as 4th column of anther array c(2)(3).
Posted

1 solution

Mabe with Array.Copy

C#
int sourceIndex = 0;
int destinationIndex = 0;
int length = 10;
            
Array.Copy(ArrayOne, sourceIndex , ArrayTwo, destinationIndex , length);


Array.Copy has four overloads...
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 10-Oct-11 18:12pm    
Correct, a 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900