title: Storing different types inside a list?
body: <p>Related: <a href="https://stackoverflow.com/questions/4343336/a-list-of-multiple-data-types">A list of multiple data types?</a></p>
  
  <p>I want to know how to store different array types (including system types) inside an array.</p>
  
  <p>The above question covered how to create a list that will allow only user-defined classes by using interfaces.  But what if I want a list that will accept only doubles and strings?  What about doubles and a class I wrote?  What about a list that will accept only a class a wrote and a class someone else wrote (so I can't add an interface to the 3rd party class, I think).</p>
  
  <p>I considered using <code>List&lt;object&gt;</code>, but I don't know if that's the accepted best practice.</p>