public Frame SearchForFrame(Type frameType) { foreach(Frame frame in Frames) { if(typeof(Frame)==frameType) { return frame; } } return null; }