using System.Collections.Generic;
public static void Main()
List<Element> elements = BuildList();
var subset = from theElement in elements
where theElement.AtomicNumber < 100
orderby theElement.AtomicNumber
foreach (Element theElement in subset)
Console.WriteLine(theElement.Name + " " + theElement.AtomicNumber);
private static List<Element> BuildList()
{ new Element() { Symbol="K", Name="IF1", AtomicNumber=19}},
{ new Element() { Symbol="Ca", Name="IF2", AtomicNumber=20}},
{ new Element() { Symbol="Sc", Name="IF3", AtomicNumber=25}},
{ new Element() { Symbol="Ti", Name="IF4", AtomicNumber=22}}
public string Symbol { get; set; }
public string Name { get; set; }
public int AtomicNumber { get; set; }