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
List< (int, int, string, ... > )
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:
List< myAnonymousType > list = new();
Are there any other options/data types that I can create inside a function to group my variables, without creating any global data types?