The Control class doesn't have that CssClass property, the WebControl does. So try to cast your childControl to WebControl. If that worked, then you can access the CssClass property.
WebControl webCtrl = childControl as WebControl;
if (webCtrl != null)
{
webCtrl.CssClass = "test";
}