請問一下,Array有屬性可以將Array內的元素位移嗎?
假設有個string[] Temp = new string[]{"A","B","C","D",
"E","F","G","H"};
內有8個元素,每次固定往後位移兩個元素,所以會有四種Case..
[0]="A" [1]="B" [2]="C" [3]="D" [4]="E" [5]="F" [6]="G" [7]="H"
[0]="G" [1]="H" [2]="A" [3]="B" [4]="C" [5]="D" [6]="E" [7]="F"
[0]="E" [1]="F" [2]="G" [3]="H" [4]="A" [5]="B" [6]="C" [7]="D"
[0]="C" [1]="D" [2]="E" [3]="F" [4]="G" [5]="H" [6]="A" [7]="B"
還是只能透過迴圈塞一個新的Array??
謝謝