[摘要]BindingFlags.Instance)); foreach(System.Reflection.FieldInfo field in fields) if(field.F...
BindingFlags.Instance));
foreach(System.Reflection.FieldInfo field in fields)
{
if(field.FieldType.Equals(literal.GetType()))
this.LiteralList.Add(field);
}
int count =0;
foreach(FieldInfo field in this.LiteralList)
{
count++;
object obj = field.GetValue(this.Page);
literal = (Literal)obj;
if(literal.Text.Equals("wx"))
literal.Text ="I can see you";
else
{
literal.Text="wangxing"+count.ToString();
}
}
}
}
#endregion
}.
关键词:.net 里面 protected private 的变量也可以访问