Как получить имена в кортеже в C# с помощью отражения, если один кортеж вложен в другой кортеж? Например, вот так [code]public static void M(((int n1, uint n2) o1, ((int p1, (int w1, uint w2) p2, uint p3) q1, ((int x1, uint x2) r1, byte r2) q2) o2) k) {} [/code] Through the TupleElementNamesAttribute attribute, I can get an array of all value names. [code]ParameterInfo parameterInfo; parameterInfo.GetCustomAttribute().TransformNames;
//"o1", "o2", "n1", "n2", "q1", "q2", "p1", "p2", "p3", "w1", "w2", "r1", "r2", "x1", "x2" [/code] But it is not clear how to associate an element of a tuple with its name in the array because there is no index.