translate function in Js script to c#

Hi guys!

I’m currently porting a .js script into a c# script, and I’m struggle with a function:

This is JS

public static function PlaneRayIntersection (plane : Plane, ray : Ray) : Vector3 {
	var dist : float;
	plane.Raycast (ray, dist);
	return ray.GetPoint (dist);
}

What is " : Vector3 " doing at the end of the function, outside the brackets?

And C#

public static function PlaneRayIntersection (Plane plane, Ray, ray)  //Vector3???
{
  float dist;
  plane.Raycast (ray, dist);
  return ray.GetPoint(dist);
}

Does anyone knows how to translate that?

Thanks in advance

The Vector3 is denoting the return type of the function. So in C# we use that instead of the function keyword:

 public static Vector3 PlaneRayIntersection (Plane plane, Ray ray) 
 {
   float dist;
   plane.Raycast (ray, out dist);
   return ray.GetPoint(dist);
 }