title: conditional EditorBrowsable by web.config AppSettings
body: <p>I have a <strong>Project A</strong> that will be used as a reference in <strong>Project B</strong>.</p>
  
  <p><strong>Project A</strong> has a class with a method that should be either visible or not depending on a condition specified in <strong>Project B</strong>. Say the method would be visible if in the web.config appSettings of the project B there was a key "DisplayMethod" with a value "true".</p>
  
  <p>This is more of a version control. I don't want to create a separate dll for a new version of the Project A. I'd like a single dll to be able to support both old and new version. This way developer of Project B can easily switch version in web.config, rebuild project and he is good to go.</p>
  
  <p><strong>Restrictions</strong></p>
  
  <ul>
  <li>I don't have control over Project B. I can only ask developer of
  Project B for a simple modification like web.config modification.</li>
  <li>I have no idea what projects will be using Project A. Project A is an
  open source project and can be used by anybody, potentially in
  thousands of projects.</li>
  </ul>
  
  <p>By "method would be visible" I mean the same functionality as the following code would do:</p>
  
  <pre><code>[EditorBrowsable(EditorBrowsableState.Never)]
  public string SomeMethod(string s)
  {
      return "Hello " + s;
  }
  </code></pre>
  
  <p><strong>Research so far:</strong></p>
  
  <p>I've seen <a href="https://stackoverflow.com/questions/3934875/is-it-possible-to-conditionally-hide-properties-at-compile-time-in-net">this question</a>. However the accepted answer to it does not work for me since the conditional constant there can only be set in the project properties of the same project where the method is.</p>
  
  <p>Conditional namespace would do as well, but there I face the same issues.</p>