title: returning a generic IEnumerable<T>
body: <p>I'm messing around with generics and IEnumerable abit, but i'm kindof stuck. 
  Here's what i'm trying to do:
  I want to have a method that returns any collection type - that implements IEnumerable (?) - (so e.g: List, Stack, Queue,  ...)</p>
  
  <p>furthermore, i want to be able to return any collection type, of any datatype.
  so i want this method to be able to return a <code>List&lt;string&gt;,</code> as well as a <code>Stack&lt;int&gt;</code>, as well as a <code>List&lt;double&gt;</code>... etc etc.       </p>
  
  <pre><code> public IEnumerable&lt;T&gt; returnSomething() 
      {
          Stack&lt;int&gt; stackOfInts = new Stack&lt;int&gt;();
          List&lt;string&gt; listOfStrings = new List&lt;string&gt;();
          return stackOfInts;
      }
  </code></pre>
  
  <p>this is what i've tried so far. this however doesn't work, i get this error:</p>
  
  <pre><code>Cannot implicitly convert type 'System.Collections.Generic.Stack&lt;int&gt;' to 'System.Collections.Generic.IEnumerable&lt;T&gt;'. An explicit conversion exists (are you missing a cast?)
  </code></pre>
  
  <p>however, if i replace the <code>IEnumerable&lt;T&gt;</code> in the method signature to <code>IEnumerable&lt;int&gt;</code> , i can return any collection of type int. This however means, that now i can't return the <code>ListOfStrings</code> anymore.</p>
  
  <p>would appreciate any suggestions or ideas :)</p>