标签:value switch win ase winform get system flag name
比如获取Button按钮:
System.Reflection.FieldInfo[] fieldInfo = form.GetType().GetFields(System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance);
for (int i = 0; i < fieldInfo.Length; i++)
{
switch (fieldInfo[i].FieldType.Name)
{
case "Button":
{
Button btn= (Button)fieldInfo[i].GetValue(form);
break;
}
}
}
标签:value switch win ase winform get system flag name
原文地址:https://www.cnblogs.com/lihaishu/p/11737202.html