I have a class that I created below
public class Program_TFT
{
public string ProgramName;
public int NumberOfProjects;
public List<Project> Projects = new List<Project>();
}
and I created a list with this class
public static List<Program_TFT> Programs = new List<Program_TFT>();
I need to be able to call elements of lists with string indexer instead of integer. Like this it works
Programs[Programs.FindIndex(x => x.ProgramName == "Prog_1")]
But instead of that I want to create a direct string indexer like this
Programs["Prog_1"]
What can I do? Thanks