Author: kirank28 | Posted on: 9/22/2009 5:26:20 AM | Views : 502

how i can sort myArray[12,2]
here is my vbscript code , is there any simple way to do this
1. public string[,] SortArray(ref string[,] MyArray) 2. { 3. Boolean keepChecking =true; 4. int loopCounter= 0 ,firstKey, secondKey, firstValue, secondValue ; 5. 6. while(keepChecking == true) 7. { 8. keepChecking = false; 9. for (loopCounter = 0; loopCounter < ((MyArray.Length) - 1); loopCounter++) 10. { 11. if(Convert.ToInt32(MyArray[loopCounter,0]) > Convert.ToInt32(MyArray[(loopCounter+1),0])) 12. { 13. //transpose the key 14. firstKey = Convert.ToInt32(MyArray[loopCounter, 0]); 15. secondKey = Convert.ToInt32(MyArray[(loopCounter+1),0]); 16. MyArray[loopCounter,0] = Convert.ToString(secondKey); ...

Go to the complete details ...