I'm a newbie and I'm asking for patience if you find this question stupid. But I really need help to sort this out. I have a list of lines with startpoint and endpoint, but I need to eliminate one if a startpoint and endpoint is the same with the endpoint and startpoint of others. Thank you for those who will answer this question. This site has been a great help to me.
private void sample()
{
SampleLine sl = new SampleLine();
List<SampleLine> listLines = new List<SampleLine>();
listLines.Add(new SampleLine { StartPoint = new Point(0, 250), EndPoint = new Point(150, 100)}); //[0]
listLines.Add(new SampleLine { StartPoint = new Point(100, 350), EndPoint = new Point(250, 200) }); //[1]
listLines.Add(new SampleLine { StartPoint = new Point(200, 500), EndPoint = new Point(350, 650) }); //[2]
listLines.Add(new SampleLine { StartPoint = new Point(300, 550), EndPoint = new Point(450, 400) }); //[3]
listLines.Add(new SampleLine { StartPoint = new Point(350, 650), EndPoint = new Point(200, 500) }); //[4]
listLines.Add(new SampleLine { StartPoint = new Point(500, 750), EndPoint = new Point(650, 600) }); //[5]
//From Above, index 2 and index 4 should be treated as the same and index 4 be deleted in the list
/*
listLines.Add(new SampleLine { StartPoint = new Point(200, 500), EndPoint = new Point(350, 650) }); //[2]
listLines.Add(new SampleLine { StartPoint = new Point(350, 650), EndPoint = new Point(200, 500) }); //[4] startpoint[4] is equal to endpoint[2] and endpoint[4] is equal to startpoint[2]
//index [4] should be deleted since it is cross equal with index[2]
*/
}