I have a need for dynamically creating array names based on trying to sort data from an input.
For example I may receive a bunch of data that I assign to a “storage” Class (multiple properties within this class). I then create an array of these classes. I would like to use one of the Class properties (ie. Job ID) as the Array of classes name. This sounds crazy, but is this possible to set an array name dynamically via code? or for sure call me crazy anyhow
haha:) I thought I would have had to convert a dictionary to an array anyhow eventually to access by data properly, but I may not be recalling this properly by the sounds of it… Thank you guys as I will try the dictionary. The only issue is that I could have literally 1000’s of different job ID name combinations so a pre-list wouldn’t help me here.
Norman I was a goalie so I guess I have been crazy for a while Thanks again guys!
HAHAHAH!! I had an episode of that when we lost to the Calgary Canucks back in 1994 when I played in the AJHL. Those are a great bunch of clips Paul thanks
Mike, you can store a dictionary inside another dictionary to achieve an “named array of named arrays” function. And if you are using a value (like JobID) to name the “array”, you can use a variable to access the data.
Cant play anymore
Got slew footed a few year back & tore the meniscus & wrecked my knee - to the point if I take a hit I’m likely crippled
Mike
While you an put dictionaries in dictionaries etc I would write a class that, even if all it does is wraps a dictionary, provides a clearer means to follow whats going on
Esp IF sometime down the road you have to change the implementation details - you can change your wrapper class & not touch other code