Hello Devz,

It happens sometimes (quite often actually) that we need to store some parameters in the config file.

To do that, we will first try to get a variable stored in the Config File (App.config or Web.config). Let’s say here we want to store a path to write some logs:

And now in the code, we want to get the path to store our logs from the config file:

 

That was pretty easy. Now let’s do the same but for a collection.

So go to your config file and add the collection. Let’s say it’s a collection of Nodes:

Here we will have to create a new class defining the structure of our Config Section containing the collection:

And now, in the code, we can get our collection from the config file:

Happy coding!   😉