I have to add new properties in expando object in foreach loop but I am not able to see a way to do it. Here is the example:
var allProperties = new List { "Name", "Email", "Roles" }; allProperties.AddRange(metaDataModel.GetFormattedFolders());
dynamic expando = new ExpandoObject();
foreach (var s in allProperties)
{
expando.s = string.Empty;
}
It consider 's' as a property instead of considering value of 's' as property name.
Thanks