public WidgetInfo GetWidget(string name) { foreach (WidgetInfo w in widgets) if (w.Name == name) return w; return null; }