XML .config opret config hvis den ikke er der
Hej...på
http://msdn2.microsoft.com/en-us/library/ms134260(en-us,VS.80).aspx
skiver de hvordan man kan lave sin config hvis den ikke er der...
så langt så godt men hvordan ????
er der en som lige kan lave det for jeg kan ikke :(
det virker ikke lige efter hensigten
det det skal er op oprette debug hvis den ikke er der, plus et par underpunkter !
----------------------------------------------
Visual Basic
' Create a custom section.
Shared Sub New()
' Get the application configuration file.
Dim config As System.Configuration.Configuration = _
ConfigurationManager.OpenExeConfiguration( _
ConfigurationUserLevel.None)
' Console.WriteLine(config.FilePath);
' If the section does not exiat in the configuration
' file, create it and save it to the file.
If config.Sections(customSectionName) Is Nothing Then
custSection = New CustomSection()
config.Sections.Add(customSectionName, custSection)
custSection = config.GetSection(customSectionName)
custSection.SectionInformation.ForceSave = True
config.Save(ConfigurationSaveMode.Full)
End If
End Sub 'New
---------------------------------