Rotate array data question
-
if i have a array string[] myArray = {"Wes","Josh","Dave"}; and i want to rotate the order ever so often programmically what is the best way to do that? The program will know when it wants dave to be first but then wes needs to be second and so forth.
-
if i have a array string[] myArray = {"Wes","Josh","Dave"}; and i want to rotate the order ever so often programmically what is the best way to do that? The program will know when it wants dave to be first but then wes needs to be second and so forth.
Then retreive the values using the index in the order you would like
only two letters away from being an asset
-
if i have a array string[] myArray = {"Wes","Josh","Dave"}; and i want to rotate the order ever so often programmically what is the best way to do that? The program will know when it wants dave to be first but then wes needs to be second and so forth.
Hello
string[] MyArray = {"Wes","Josh","Dave"};
private void Rearrange(byte OldIndex, byte NewIndex)
{
string Temp = MyArray[OldIndex];
MyArray[OldIndex] = MyArray[NewIndex];
MyArray[NewIndex] = Temp;
}Regards:rose: