C
C#17mo ago
Luppole

❔ Is there a way to name an object with an input?

up
6 Replies
phaseshift
phaseshift17mo ago
wat
Pobiega
Pobiega17mo ago
wat
Becquerel
Becquerel17mo ago
please give an example of what you mean like
var name = "thing";
var blah = new name();
var name = "thing";
var blah = new name();
?
Denis
Denis17mo ago
I believe they are asking whether it is programmatically possible to specify a variables name during runtime The answer is no I believe it might have been possible to do that in ActionScript, but don't quote me on that, I barely knew what I was doing when I was using it. If I understood your question correctly, what you need is a dictionary var dynamicValues = new Dictionary<string, object>(); You can add values that are associated with some name (key) to the dictionary as you please
Angius
Angius17mo ago
Just make sure you use an actual proper type and not object
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts