Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); ConfigurationSectionGroup customSectionGroup = config.SectionGroups.Add("CustomSettings"); ConfigurationSection newSection = customSectionGroup.Sections.Add("MyCustomSection", ConfigurationManager.AppSettings["myCustomConfigFile"]); newSection.SectionInformation.AllowExeDefinition = ConfigurationAllowExeDefinition.MachineToLocalUser; config.Save(ConfigurationSaveMode.Modified);In this example, we create a new section group called "CustomSettings" and add a new section called "MyCustomSection". We also set the AllowExeDefinition property to MachineToLocalUser so that the configuration can be used by both the machine and the local user. Finally, we save the configuration changes. The package library for this example is System.Configuration.ConfigurationManager. This package provides access to configuration files for applications.