Hi I recently started learning LINQ. Bsically to understand this technology better I try to rewrite some of my previous programs using LINQ. I mean I try to replace foreach methods etc with linq queries.
Today I encounterd a problem. I have a list of objects element
List<Element> elementList
public class Element
{
private string Id;
private List<Element> consequentElementsList;
}
List of elements contains all elements which are placed on form. Each element has a List of consequtive elements. I need to find all predecessors element of element I've chosen. Is there any way to do this in LINQ?