title: Using App.Config to derive which class/variables to use
body: <p>I'm building a selenium framework which needs to behave differently between different customers e.g. 2 customers will have slightly different webpages</p>
  
  <p>I'm trying to drive this from the app.config appsettings e.g.</p>
  
  <pre><code>&lt;add key="Customer" value="ABC" /&gt; 
  </code></pre>
  
  <p>I then have a Customer classes:</p>
  
  <pre><code>public static class Customer
      {
          public static string CustomerName = ConfigurationManager.AppSettings["Customer"];
          public static string custAddress = {CustomerName}.custAddress ; //this is obviously wrong - how do i do this?...
      }
  
  public static class ABC
      {
          custAddress = "customer abc address";
  
      }
  
  public static class DEF
      {
          custAddress = "customer def address";
  
      }
  </code></pre>
  
  <p>I want to then call it the simplest way possible to get the value e.g.</p>
  
  <pre><code>var address = Customer.custAddress;
  </code></pre>
  
  <p>...which will be set depending on the app.config setting.</p>
  
  <p>I'm a c# newbie so apologies for the lack of clarity - i've been trying to figure out how to cast the customer string into the class of its namesake. I thought interfaces may also be an option but struggling with the complexity. Is there a better way?</p>