title: Refactoring a Method to implement multiple namespaces
body: <p>I'm attempting to prepare my application code to accept an annual change of a third-party <code>wsdl</code>.  I cannot make and have no control over the design of this <code>wsdl</code>.  Objects within this <code>wsdl</code> may change, have items added, be removed, etc.  However, I still need to keep the previous version(s) of the <code>wsdl</code>.</p>
  
  <p>My plan is to add the current <code>wsdl</code> as a Service Reference, as I did with the previous <code>wsdl</code>.</p>
  
  <p>At the moment, I have multiple methods similar to that below (including the one below).</p>
  
  <p>Using a property, <code>TaxYear</code> to determine which <code>wsdl</code> to actually reference: "Service2015" or "Service2016".  I am passing in generic objects representing the objects from the <code>wsdl</code>, and passing in a <code>ref</code> parameter for those objects which I use in a parent method.</p>
  
  <p>Refacotring like this, imposes a LOT of bloat, and I can't help but think there has to be a better way to do what I'm trying to do.</p>
  
  <p><strong>Is there a better way at doing this using C#, or is this the best and most inconvenient way of doing what I need to accomplish.</strong></p>
  
  <pre><code>private static void RetrieveRequestObject(ref object objRequest, object objBusinessHeader, object objSecurityHeader, object objManifestHeader, object objFormData)
  {
      if (TaxYear.Equals(2015))
      {
          objRequest = new Service2015.BulkRequestTransmitterRequest()
          {
              ACABusinessHeader = (Service2015.ACABulkBusinessHeaderRequestType)objBusinessHeader,
              Security = (Service2015.SecurityHeaderType)objSecurityHeader,
              ACATransmitterManifestReqDtl = (Service2015.ACATrnsmtManifestReqDtlType)objManifestHeader,
              ACABulkRequestTransmitter = (Service2015.ACABulkRequestTransmitterType)objFormData
          };
      }
      else if (TaxYear.Equals(2016))
      {
          objRequest = new Service2016.BulkRequestTransmitterRequest()
          {
              ACABusinessHeader = (Service2016.ACABulkBusinessHeaderRequestType)objBusinessHeader,
              Security = (Service2016.SecurityHeaderType)objSecurityHeader,
              ACATransmitterManifestReqDtl = (Service2016.ACATrnsmtManifestReqDtlType)objManifestHeader,
              ACABulkRequestTransmitter = (Service2016.ACABulkRequestTransmitterType)objFormData
          };
      }
  }
  </code></pre>