namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
//需要动态添加的属性名称
string[] propertyList = new string[] { "f1", "f2", "f3", };
object o = new { };
//动态添加属性,并赋值
for (int i = 0; i < propertyList.Length; i++)
{
//TODO:???
//o.propertyList[i] = i;
}
//
//HttpContext.Current.Response.Write(o.f1+o.f2+o.f3);
}
}
}
}
谁能帮我补充上面的代码。谢谢
æ±å¤§ç¥æç¹å