Hi all,
I have a 2 dimensional array, I want shift the value of rows :
int [,] s=new int [2,2];
s= {(1,0,0),(0,1,0),(0,0,1)}
when I shift this array rows like below:
s={(0,1,0),(0,0,1),(0,0,0)}
is it possible by array.copy? and how?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 28, 2013, 7:12 PM
VulpesPosted Aug 29, 2013, 7:08 AM
The Length property still works for a 2 dimensional array but returns the total number of elements in the array i.e. 9 in this example.
diamond diamondPosted Aug 29, 2013, 4:37 AM
Let me know why use s.Get length(0) and somewhere Get length(1)?
diamond diamondPosted Aug 28, 2013, 1:34 AM
Iftikar HussainPosted Aug 27, 2013, 11:53 PM
Not clear about your query. What does mean by shifting here?
Regards,
Iftikar