private void RunCustomGenericCollection() { PeriodicTable < Element > elements = new PeriodicTable<Element>(); elements.AddElement( new Element( ElementType.Fluorine ) ); elements.AddElement( new Element( ElementType.Carbon ) ); elements.AddElement( new Element( ElementType.Lithium ) ); foreach( Element element in elements ) element.Display(); }