Is there a way to dynamically name variables?
What I need to do is take a list of variable names from an input file and create variables with those names. Is this p
C# 4.0, using the dynamic objects:
dynamic
dynamic d = new ExpandoObject(); ((IDictionary)d)["MyProperty"] = 5; int val = d.MyProperty; // 5