How can i select a random item from list?,How to select a random item in a list?

The code actually select the nearest item from list, i whant a random one, i should replace the entire foreach. this is the code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TL.UtilityAI;
using TL.Core;

namespace TL.UtilityAI.Actions
{
[CreateAssetMenu(fileName = “Work”, menuName = “UtilityAI/Actions/Work”)]
public class Work : Action
{
public override void Execute(NPCController npc)
{
npc.DoWork(10);
}

    public override void SetRequiredDestination(NPCController npc)
    {
        float distance = Mathf.Infinity;
        Transform nearestResource = null;

        List<Transform> resources = npc.context.Destinations[DestinationType.resource];
        foreach (Transform resource in resources)
        {
            float distanceFromResource = Vector3.Distance(resource.position, npc.transform.position);
            if (distanceFromResource < distance)
            {
                nearestResource = resource;
                distance = distanceFromResource;
            }
        }

        RequiredDestination = nearestResource;
        npc.mover.destination = RequiredDestination;
    }
}

}
,How can i write a code that select a random item from a list?
This is the code and actually select the nearest object from list:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TL.UtilityAI;
using TL.Core;

namespace TL.UtilityAI.Actions
{
[CreateAssetMenu(fileName = “Work”, menuName = “UtilityAI/Actions/Work”)]
public class Work : Action
{
public override void Execute(NPCController npc)
{
npc.DoWork(10);
}

    public override void SetRequiredDestination(NPCController npc)
    {
        float distance = Mathf.Infinity;
        Transform nearestResource = null;

        List<Transform> resources = npc.context.Destinations[DestinationType.resource];
        foreach (Transform resource in resources)
        {
            float distanceFromResource = Vector3.Distance(resource.position, npc.transform.position);
            if (distanceFromResource < distance)
            {
                nearestResource = resource;
                distance = distanceFromResource;
            }
        }

        RequiredDestination = nearestResource;
        npc.mover.destination = RequiredDestination;
    }
}

}

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

public class Test1 : MonoBehaviour
{
    private void Start()
    {
        List<Transform> resources = new List<Transform>();
        resources.Add(transform);
        resources.Add(transform);
        resources.Add(transform);
        resources.Add(transform);

        int rand = Random.Range(0, resources.Count);
        print(resources[rand]);
    }
}