When we are using Indexers in order to access our variables, we can expand the property through a dynamic reference of the accessed variable, we achieve this through ExpandoObject of System.Dynamic namespace
In this example we set values in a Dictionary type variable, and expand the property name on a dynamic variable
In this example we set values in a Dictionary type variable, and expand the property name on a dynamic variable
dynamic Values = new ExpandoObject();
var _Values = Values as IDictionary<string, object>;
_Values["Name"] = "Little Writer";
_Values["Weight"] = 1550.0M;
string name = Values.Name;
decimal weight = Values.Weight;