0

I want to store a list of 10-20 elements inside application configuration file in a C# application. I realize that I can use add key tags in appsettings section, but then I will have to create a unique key for each.

I am planning to loop over the elements in a section, and tried storing it. but it fails it initialize confiuration managager

EDIT: I want to store a section for table names to verify , where user can enter a list of tables to run a test on each

1 Answer 1

4

You can create your own IConfigurationSectionHandler.

EDIT

Just as an aside, this may be more work that you need given your last edit. You could just use a delimiter not found in the acceptable identifier list and split the string. (probably a whole lot easier)

Sign up to request clarification or add additional context in comments.

1 Comment

Yup, create your own ConfigurationSection classes, handle it yourself. Not hard to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.