title: Strategy Pattern- Correct Implementation
body: <p>I'm using this pattern for the first time, and using C#.</p>
  
  <p>I just wanted to check that this is the correct implementation.<br>
  I have a button on a Winform, and when clicked on that will output some data in a particular format, defined by choosing from a drop down box.  Now this may change in the future, hence me using the Strategy pattern to encapsulate what changes.</p>
  
  <p>I have a 'Strategy Interface' that simply exposes a single method: "Display Data()".</p>
  
  <p>On my button click I use the following code:</p>
  
  <pre><code>private void ConfirmButton_Click(object sender, EventArgs e)
      {
          IViewData viewData;
  
          switch (outputMedia)
          {
              case "Excel":
                  viewData = new ExcelOutput(operation, study);
                  viewData.DisplayData();
                  break;
              case "Spotfire":
                  viewData = new SpotfireOutput(operation, study);
                  viewData.DisplayData();
                  break;
          }
  
  
      }
  </code></pre>
  
  <p>Is this an acceptable way to use this pattern?  Obviously if additional output media is identified then I will simply create a new subclass and add an extra 'case' on the switch statement.</p>
  
  <p>Thanks.</p>