title: Scalable C# Code for Creating Array from Config File
body: <p>I have config values as shown below</p>
  
  <pre><code>add key="Screen1" value ="Admin"
  add key="Screen2" value ="Log"
  </code></pre>
  
  <p>In future new screens will get added. In C#, I need to create an array of string with these screen names. How can we do this (keeping in mind that the code need to work even if we add new screens)?</p>
  
  <p>Note 1: I am looking for an approach that does <strong>not</strong> use custom configuration.</p>
  
  <p>Note 2: I will have maximum of 10 config items with the name starting as "Screen". But I will have 10,000 other config items.</p>
  
  <p><strong>REFERENCE</strong></p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/11778979/better-code-pattern-for-checking-existence-of-value">Better code/ Pattern for checking existence of value</a></li>
  <li><a href="https://stackoverflow.com/questions/447199/generic-method-for-reading-config-sections">Generic method for reading config sections</a></li>
  <li><a href="https://stackoverflow.com/questions/6483032/generating-numbers-list-in-c-sharp">Generating numbers list in C#</a></li>
  <li><a href="https://stackoverflow.com/questions/3844611/c-detecting-sequence-of-at-least-3-sequential-numbers-from-a-given-list">Detecting sequence of at least 3 sequential numbers from a given list</a></li>
  <li><a href="https://stackoverflow.com/questions/10308381/does-linq-cache-computed-values">Does LINQ cache computed values?</a></li>
  <li><a href="https://stackoverflow.com/questions/2731384/is-there-an-easy-method-to-combine-two-relative-paths-in-c">Is there an easy method to combine two relative paths in C#?</a></li>
  </ol>