internal void CreateSectionGroup (SectionGroupInfo parentGroup, string name, ConfigurationSectionGroup sec)
{
if (parentGroup.HasChild (name)) throw new ConfigurationException ("Cannot add a ConfigurationSectionGroup. A section or section group already exists with the name '" + name + "'");
if (sec.Type == null) sec.Type = system.Host.GetConfigTypeName (sec.GetType ());
sec.SetName (name);
SectionGroupInfo section = new SectionGroupInfo (name, sec.Type);
section.StreamName = streamName;
section.ConfigHost = system.Host;
parentGroup.AddChild (section);
elementData [section] = sec;
sec.Initialize (this, section);
}