Nano Quantum Tech
Monday, March 5, 2012
How to select a random value from an array?
string[] myArray = new Array[3]{"ram","ThulasiRam.s","Ram.s"};
// myArray can be integer or string data type
Random random = new Random();
string randomValue = myArray[random.Next(0, myArray.length-1)];
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)