troubleshooting Question

Custom Configuration Section in C#

Avatar of ashfox
ashfoxFlag for United Kingdom of Great Britain and Northern Ireland asked on
C#
5 Comments1 Solution893 ViewsLast Modified:
Hello,

I'm creating an application in C# and wish to store custom settings.

I've attached several files which create a custom section in the App.config file.

As shown in the Program.cs file, I can access stored values easily.

What I would also like is the ability to create new or delete existing messages during program execution. Could someone provide an example of how I could do this?

For example how would I go about adding a new line in the config file at run time like...

<Message Name="ExampleName" Value="ExampleValue" isRead=false />

Many thanks.
App.config
MessageCollection.cs
MessageElement.cs
MyConfiguration.cs
Program.cs
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros