title: How to use generic Queue where the type also has a generic paramater?
body: <p>I have a situation where I would like to have a member property on my class that utilizes the generic <code>Queue&lt;T&gt;</code> provided by .Net, however, my type is also generic.</p>
  
  <p>For example:</p>
  
  <p>I want to declare my class having a member property being a Queue instance;</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class SomeServiceThing: Singleton&lt;SomeServiceThing&gt;
  {
      private Queue&lt;SomeType&lt;T&gt;&gt; = new Queue&lt;SomeType&lt;T&gt;&gt;();
  
      ....
  
      private void EnqueueEvent&lt;T&gt;(SomeType&lt;T&gt; _event)
      {
          pendingEvents.Enqueue(_event);
          lastEventQueued = DateTime.Now;
      }
  
      private void Update()
      {
          if (someConditionIsMet)
          {
              // flush the queue and perform an operation with each pending event
          }
      }
  }
  </code></pre>
  
  <p>The compiler error I received is "Cannot resolve symbol 'T'", which makes sense as T cannot be derived when the class is instantiated, but then I would ask how would you go about using Queue in this way when T itself has a generic parameter?</p>