How to add an element movie, to an existing category element? Currently im just able, to create new list entries on both fields.
class MovieSolver
{
public string Category { get; set; }
public List<string> Movie { get; set; }
}
class CreateMovieList
{
readonly static List<MovieSolver> playerTargetList = new List<MovieSolver>();
public static void MovieCBO()
{
playerTargetList.Add(new MovieSolver { Category = "Action", Movie = new List<string> { "Taken", "The Factory", "Wind River" } });
playerTargetList.Add(new MovieSolver { Category = "Comedy", Movie = new List<string> { "Gold", "Hangover", "We are the Millers" } });
playerTargetList.Add(new MovieSolver { Category = "Thriller", Movie = new List<string> { "Jack Reacher", "Real Steel", "Iron Man I" } });
}
}
Beside is there a smarter way to create the class MovieSolver?
List<string>. Where doesList<List<int>>come from. And what do you mean by 'smarter'?public Dictionary<string,List<string>> playerTargetList;