translate this to c# help plz!

can someone plz translate this to c# for unity ? im doing steering behaviors and this is the separation one

 public function computeAlignment(myAgent:Agent):Point
 {
 var v:Point = new Point();
 var neighborCount = 0;
 for each (var agent:Agent in agentArray)
 {
     if (agent != myAgent)
     {
         if (myAgent.distanceFrom(agent) < 300)
         {
             v.x += agent.velocity.x;
             v.y += agent.velocity.y;
             neighborCount++;
         }
  
     }
  
 }
 if (neighborCount == 0)
     return v;
 
 v.x /= neighborCount;
 v.y /= neighborCount;
 v.normalize(1);
 return v;
 
 }

public Point computeAlignment(Agent myAgent){
Point v = new Point();
int neighborCount = 0;
foreach(Agent agent in agentArray){
if(agent != myAgent){
if(myAgent.distanceFrom(agent) < 300){ // make it 300f if distanceFrom returns a float value
v.x += agent.velocity.x;
v.y += agent.velocity.y;
neighborCount++;
}
}
}
if(neighborCount == 0){
return v;
}
v.x /= neighborCount;
v.y /= neighborCount;
return v.Normalized();
}

Please don’t copy paste … Untested code and accept if it helps