How do I name variables dynamically in C#? -
is there way dynamically name variables?
what need take list of variable names input file , create variables names. possible?
something like:
variable <dynamic name of variable here> = new variable(input); assume have variable class taken care of, , name of variable contain in string called strline.
use dictionary<string, variable>.
e.g.
var vartable = new dictionary<string, variable>(); vartable[strline] = new variable(input);
Comments
Post a Comment