this is my list
public string state { get; set; }
public string city { get; set; }
public Point p1 { get; set; }
public Point p2 { get; set; }
public List<Explorer> line = new List<Explorer>();
public List<Explorer> rectangle = new List<Explorer>();
public List<Explorer> ellipse = new List<Explorer>();
this is my adding elements to list code
line.Add(new Explorer
{
state = "AAAA",
city = "BBB",
p1 = start,
p2 = end
});
relevant to the values of state and city i need to find the points of their location .
You can use LINQ to filter your list/retrieve the item you want:
using Where
using Single/SingleOrDefault/First/FirstOrDefault
If you are only interested in the points, you can use a Select projection