I’ve clearly established how to make a generic Tuple as follows when the number of items is known in advance…
Type t = typeof(Tuple<,,>);
Type[] keys = new Type[] { typeof(string), typeof(string), typeof(int) };
Type specific = t.MakeGenericType(keys);
but what if the number of objects in the “keys” array is variable? How to you start the ball rolling with the initial assignment to “t”?
Cheers.
Craig
Personally, I would have an array of the generic type definitions:
You could do this in code, but it would be a bit of a pain… probably something like:
Or avoiding the array: