I would to build a function which should return a collection of childen with given type:
repetitive code like this
IEnumerable<ComboBox> collection = panel.Children.OfType<ComboBox>(); IEnumerable<TextBox> collection = panel.Children.OfType<TextBox>();
should transform in something like
static IEnumerable GetCollection(T type) { return panel.Children.OfType<type>(); }
Is this possible?