I have this class:
public class Game
{
public string Name { get; set; }
public int Players{ get; set; }
public int ReleaseYear{ get; set; }
}
I want to create a list,
List<Game> list = new List<Game>();
and look for one element, for example:
Game g = new Game();
g = (list.First(k => k.Players == 2)) as Game; // this line do nothing
But the program finishes doing nothing without throwing any exception, what is the problem?
If it helps, this works