I have to select the object in the list with variable called “F” minor. How can I do with LINQ?
I have tried so it gives me a float, I must return the item
class Node
{
public float G { get; set; }
public float H { get; set; }
public float F { get { return this.G + this.H; } }
public bool isWalkable { get; set; }
}
class Main
{
List<Node> openList = new List<Node>();
float min = openList.Min(p => p.F);
}