transform.TransformDirection setting a size?

I am shooting raycasts and was wondering if there is a way to set a size for the raycast? Right now its shooting forever until it hits something. Im trying to set a specific length or size to the raycast.

RaycastHit hitInfo;
Vector3[] direction = new Vector3[5];//Array of Raycasts 

void Raycasting(){

this.direction[0] = transform.TransformDirection (new Vector3(-1f,0f,3))*3;
this.direction[1] = transform.TransformDirection (new Vector3(-.5f,0f,3))*3;
this.direction[2] = transform.TransformDirection (new Vector3(0f,0f,3))*3;
this.direction[3] = transform.TransformDirection (new Vector3(.5f,0f,3))*3;
this.direction[4] = transform.TransformDirection (new Vector3(1f,0f,3))*3;

}

The third parameter of the Physics.Raycast() function is the distance, which should be given as a float. By the way, what you have is not an array of Raycasts, but an array of Vector3s, which are only one component necessary to do a Raycast (which is a function, something you do, not an object, something you have).

So when you call the function later on, make sure you specify the distance.