title: Implementation-specific constants in service layer
body: <p>I have an ASP.Net Web Forms project, which is built as (among other things) a user interface to a CRM web service.</p>
  
  <p>I have an interface, <code>IMembershipService</code>, which exposes a number of methods for purchasing different kinds of subscriptions to a service. The concrete implementation of this, <code>SpecificMemberService</code>, will abstract a number of web service calls to a third-party CRM system.</p>
  
  <p>The concrete implementation requires that different 'subscription levels' be passed to it as specific 4-character string codes. Currently, I have defined the following in my service layer:</p>
  
  <pre><code>public static class MemberTypes
  {
      public const string Basic = "MEM1";
      public const string Extra = "MEM2";
      public const string Professional = "MEM3";
  }
  </code></pre>
  
  <p>However, these codes are specific to the concrete class <code>SpecificMemberService</code> and - as such - shouldn't really be independent of it as they currently are. How can I expose strongly-typed  <code>MemberType</code> codes to my web application, which are constant with respect to a <em>concrete implementation</em> of <code>IMembershipService</code>?</p>