c# Getting Transforms from array made from FindGameObjectsWithTag

Hey guys!

Short question,

I’ve made an Array of GameObjects using FindGameObjectWithTag, and now I want to take the transforms off those GameObjects and put them in a Transform Array, how should I formulate this?

GameObject[] taggedWaypoints = GameObject.FindGameObjectsWithTag("Waypoint");
        Transform[] waypoints = taggedWaypoints[].GetComponent<Transform>; // this is definitely wrong, how do I correct this?

You can do it like this

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

GameObject[] taggedWaypoints = GameObject.FindGameObjectsWithTag("Waypoint");
List<Transform> waypoints = new List<Transform>();
for (i = 0; i < taggedWaypoints.Length; i++)
{
    waypoints.Add(taggedWaypoints*.GetComponent<Transform>());*

}