how to remove property from Westwind.Utilities.Dynamic.Expando
my tries but app crash
any way to remove property from object
public class modelStatic : Westwind.Utilities.Dynamic.Expando
{
public list<string >attachments{get;set;}
....
.. // so other properties
}
dynamic dynamicModel = new ExpandoObject();
dynamicModel = modelStatic;
((IDictionary<String, Object>)dynamicModel)?.Remove("attachments");
You can't remove existing static properties. You can only remove dynamic properties you add to the Expando via code. Otherwise they are not in the dictionary...
how to remove property from Westwind.Utilities.Dynamic.Expando
my tries but app crash any way to remove property from object