js to c# converting trouble

I’m converting a js script to a c# script but i am stuck on this part. I’m trying to draw a line between objects

    for (int i=0; i<path.Count; i++) {
        new Vector3 pos = path*;*

if (i>0) {
var prev=path[i-1].position;
new Gizmos.DrawLine(prev,pos);
Gizmos.DrawWireSphere(pos,0.6f);
}
}

edit :
prev=path[i-1].position is the big problem here i just cant get it to work.
this is the full script

var path:Array;
var rayColor:Color=Color.white;

function OnDrawGizmos(){
Gizmos.color=rayColor;
var path_objs:Array;
path_objs=transform.GetComponentsInChildren(Transform);
path=new Array();
for(var path_obj:Transform in path_objs)//dit kan een forEach zijn
{
if(path_obj!=transform)
{
path[path.length]=path_obj;
}
}
for(var i:int=0;i<path.length;i++)
{
var pos:Vector3=path*.position;*
if(i>0)
{
var prev=path[i-1].position;
Gizmos.DrawLine(prev,pos);
Gizmos.DrawWireSphere(pos,0.6);
}
}
}
edit : the answer was Transform pos = (Transform)path*;*

Update: this is using the full script you posted.

List<Transform> path;
Color rayColor = Color.white;

void OnDrawGizmos()
{
	Gizmos.color = rayColor;
	Transform[] path_objs;
	path_objs = transform.GetComponentsInChildren<Transform>();
	path = new List<Transform>();
	foreach (Transform path_obj in path_objs)//dit kan een forEach zijn 
	{
		if(path_obj != transform)
		{
			path.Add( path_obj );
		}
	}
	for( int i = 0; i < path.Count; i++ )
	{
		Vector3 pos= path*.position;*
  •  if( i > 0 )*
    
  •  {*
    
  •  	Vector3 prev=path[i-1].position;*
    
  •  	Gizmos.DrawLine( prev, pos );*
    
  •  	Gizmos.DrawWireSphere( pos, 0.6f );*
    
  •  }*
    
  • }*
    }
    I tried as best as I could to interpret what you wanted from your js script and converted it to c#. I have no compile errors when I put this in my project.