I haven't worked with LINQ before, but I know how efficient it is.
I have created a List with an object which you can see below:
public sealed class Item
{
public long Start { private set; get; }
public long End { private set; get; }
public Item(string start, string end)
{
this.Start = Convert.ToInt64(start);
this.End = Convert.ToInt64(end);
}
}
This will be populated with DataSet
s containing round about 200k Items.
Now, I want to select the best single item between the properties 'Start' and 'End'.
this.ItemList.Add(new Item(100000, 100002));
this.ItemList.Add(new Item(100003, 100006));
this.ItemList.Add(new Item(100007, 100012));
this.ItemList.Add(new Item(100013, 100026));
this.ItemList.Add(new Item(100027, 100065));
From another tool, I've got the value: 100009
How can I get the object new Item(100007, 100012)
back with LINQ? Does anyone have any suggestions?