object obj = this.GetType().GetField("控件名称", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.IgnoreCase).GetValue(this); Label lbl = (Label)obj;
object obj = this.GetType().GetField("控件名称", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.IgnoreCase).GetValue(this); Label lbl = (Label)obj;
转载于:https://www.cnblogs.com/rogation/archive/2012/11/21/2781066.html