title: c# how to create an array of an anonymous type?
body: <p>I have a function that collects stats in a loop and stores them in 7 different variables. I want to group these variables into some kind of data structure, I don't want to create any class or a struct with global visibility for it, because I only need it in one function.
  I can use tuples, like
  <code>List&lt; (int, int, string, ... &gt; ) </code>
  for grouping, but what if I want to use an anonymous type, how can I create an array of it or put it inside a list? Like:</p>
  <p><code>List&lt; myAnonymousType &gt; list = new();</code></p>
  <p>Are there any other options/data types that I can create inside a function to group my variables, without creating any global data types?</p>