Translate this statement from .js to C#

I am doing a tutorial on CG cookie. the script is all in Javascript and I thought It would be a good exercise to try to write the same code in C#, I got stuck on implementing this function though. In Javascript it is:

`function CalculateAimPosition(targetPos : Vector3)  
  {  
var aimPoint = Vector3(targetPos.x + aimError, targetPos.y+aimError, targetPos.z+aimError);  
desiredRotation = Quaternion.LookRotation(aimPoint);  
}`

I am trying to write this in C# since my C# skills need work. I tried:

 void CalculateAimPosition (Vector3 targetPos)

{
aimPoint = Vector3(targetPos.x + aimError, targetPos.y+aimError, targetPos.z+aimError);
desiredRotation = Quaternion.LookRotation(aimPoint);

}

I get an error that says ‘void’ cannot be used in this context. I know I am doing something wrong but I can’t quite figure out what.

The error listed is likely to be a line or two before this function. As for this function, try this:

void CalculateAimPosition(Vector3 targetPos)
{
    Vector3 aimPoint = new Vector3(targetPos.x + aimError, targetPos.y+aimError, targetPos.z+aimError);
    desiredRotation = Quaternion.LookRotation(aimPoint);

}

//declared elsewhere as specified types (or int for aimError though doubtful)
float aimError;
Quaternion desiredRotation;

//should hopefully be something like this:
void CalculateAimPosition(Vector3 targetPos){
	Vector3 aimPoint = Vector3(targetPos.x + aimError, targetPos.y + aimError, targetPos.z + aimError);
	desiredRotation = Quaternion.LookRotation(aimPoint);
}

Just make sure something isn’t trying to return a value from CalculateAimPosition and you’re not already embedded in another function.