Convert Int to String

I have a lot of cubes in my scene, which all of them is named a number.

#pragma strict


var amount = 25;
var objectNumber = 0;
var object : GameObject;

function Start () {

objectNumber = Random.Range(1, amount);
object = gameObject.Find(objectNumber);
}

I want to randomly select one of the cubes by using random.range, and then select the choosen number, which one of the cubes has and put it in the object variable.
The problem is, that the name of the cubes are strings, and i apparantly can’t choose them with a int.
Is there a way i can do this?
I don’t want to put each of them in a array. To much time since i will be doing it with a lot of cubes.

There are lots of ways, including…

int i = 10;
string s;
s = i.ToString();
s = Convert.ToString(i);
s = string.Format("{0}", i);
s = "" + i;
s = string.Empty + i;
s = new StringBuilder().Append(i).ToString();

Either of the first two are probably the best / most typical. The remaining ones are just to show some variety…

@NinjaRubberBand Yea sure, you can do something like:

     #pragma strict
     
     var amount = 25;
     var objectNumber = 0;
     var object : GameObject;
     
     function Start () {
     
     objectNumber = Random.Range(1, amount);
     object = GameObject.Find(objectNumber.ToString());
     }