I'm generating a GUI which users will type the name of a test and then generate structs based off of the test type. Right now they have 4 selections to choose from for struct naming (Body, Head, Leg, and New). I need this ability for the "New" element so that this code doesn't become useless when new test types are generated. (I'm only stating this because there are plenty of answers with naming struct fields that argue that I should never need to do this).
I have a temporary variable k, that holds the struct until the end, where I would like to essentially go (variable) = k, and have it generate
k.TestName k.SignalName k.Signals.. etc
(variable) = k;
(variable).TestName (variable).SignalName (variable).Signals.. etc
Any and all ideas would be greatly appreciated.
Best, ML
Best Answer