I created the list
List<Worker> list = new List<Worker>();
In the class "Worker" are 2 variables:
public static int ID = 0;
public string Name;
When i create the list, i want to output only the name of each worker, so i created a for-loop
for (int i = 0; i < temp.Length; i++)
{
Console.WriteLine($"Worker {i+1}: {//name of worker}");
}
but i don`t know how to extract the variable "Name" from the list