I have a function that I can't seem to get to work properly. This function
is suppose to loop through a collection of controls and locate an existing
ojbect of that type. if it locates the control it uses that object if it
does not a new object is added.

I have a function that I can't seem to get to work properly. This functionis suppose to loop through a collection of controls and locate an existingojbect of that type. if it locates the control it uses that object if itdoes not a new object is added.

An example:

public class MyControl : Control
{
// implementation of your control
}