After adding a plot,
Add(new Plot(Color.Orange, "Plotypus") );
it shows to access the element in the Plots collection using it's ordinal value, i.e. Plots[0]
Isn't there a way to access the Plot in the Plots collection by using the "name" parameter when the plot was added?
i.e. Plots["Plotypus"]
or
Plots.Name("Plotypus")
It seems prone to errors if you are relying on the ordinal access based on how new items are added to the collection, if some code changes in the future and the order changes. Of course the same risk would apply if access the collection element by it's name property if the name value was changed in code.
Comment