title: Using Datatype as value in Dictonary
body: <p>I have this structure - here in a dummy implementation :</p>
  
  <pre><code>interface IBasicWaveform
  {
      double FindAmplitudeFactor(int samplesPerSecond);
      double ValueAtPhase(double phase);
  }
  
  abstract class BaseWaveform : IBasicWaveform
  {
      public double FindAmplitudeFactor(int samplesPerSecond)
      {
          throw new NotImplementedException();
      }
  
      public double ValueAtPhase(double phase)
      {
          throw new NotImplementedException();
      }
  }
  
  sealed class SawDownWaveform : BaseWaveform
  {
  }
  
  sealed class SawUpWaveform : BaseWaveform
  {
  }
  </code></pre>
  
  <p>I would like to create a <code>Dictionary</code> with a Description (a String) and a BaseWaveform DATA TYPE as TValue</p>
  
  <p>So I would like to write code like this: </p>
  
  <pre><code>    var myDict = new Dictionary&lt;string,  BaseWaveform**Datatype** &gt;()
      {
          {"Saw down", SawDownWaveform},
          {"Saw up", SawUpWaveform}
      }
  </code></pre>
  
  <p>I've also tried this: </p>
  
  <pre><code>    var myDict = new Dictionary&lt;string, Type&gt;()    
      {
          {"Saw down", (Type)SawDownWaveform},
          {"Saw up", (Type)SawUpWaveform}
      };
  </code></pre>
  
  <p>But it gives me a compile error:</p>
  
  <blockquote>
    <p>'WindowsFormsApplication5.SawDownWaveform' is a 'type' but is used like a 'variable'</p>
  </blockquote>
  
  <p>The question is: how can I do this in c#? </p>