发布于 1年前
C#给ExpandoObject动态添加属性
C#给ExpandoObject动态添加对象:
方法一:
dynamic x = new ExpandoObject();
x.NewProp = string.Empty;
方法二:
var x = new ExpandoObject() as IDictionary<string, Object>;
x.Add("NewProp", string.Empty);
C#给ExpandoObject动态添加对象:
方法一:
dynamic x = new ExpandoObject();
x.NewProp = string.Empty;
方法二:
var x = new ExpandoObject() as IDictionary<string, Object>;
x.Add("NewProp", string.Empty);