That makes sense , depending on what kind of object you are using. If ControlContainer is not an instance of an object that derives from Control, then it will not contain a Controls list. ControlContainer sounds like a class, rather than an instance?
Try:
GroupBox gb = new GroupBox();
...
foreach (Control x in gb)
{
...
}