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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Aug 28, 2013, 3:12 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 27, 2013, 7:53 PM EDT
Not clear about your query. What does mean by shifting here?
Regards,
Iftikar
diamond diamond131 reputationPosted Aug 27, 2013, 9:34 PM EDT
diamond diamond131 reputationPosted Aug 29, 2013, 12:37 AM EDT
Let me know why use s.Get length(0) and somewhere Get length(1)?
VulpesRank #55 · 29.2K reputationPosted Aug 29, 2013, 3:08 AM EDT
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.