Almost every C# application has its own Configuration Settings file also known as App.Config. If you look on your App.Config file you probably will see a list of key value pairs:
<add key="key0" value="value0" /> <add key="key1" value="value1" /> <add key="key2" value="value2" /> ...But what if you need some more complex configurations? Something like this:
<MySection> <MySettings MyKey="John" MyValue1="Developer" MyValue2="Expert"/> <MySettings MyKey="Tomas" MyValue1="Developer" MyValue2="Junior"/> <MySettings MyKey="Robert" MyValue1="Developer" MyValue2="Senior"/> <MySettings MyKey="Kurt" MyValue1="IT" MyValue2="Expert"/> <MySettings MyKey="Anna" MyValue1="HR" MyValue2="Senior"/> </MySection>Today I'll show how to build this kind of Custom Configuration Settings in C#.