📌  相关文章
📜  c# 获取所有类字段的列表 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:57.203000             🧑  作者: Mango

代码示例2
// List the properties.
// Use the class you want to study instead of Form1.

PropertyInfo[] property_infos = typeof(Form1).GetProperties(
    BindingFlags.FlattenHierarchy |
    BindingFlags.Instance |
    BindingFlags.NonPublic |
    BindingFlags.Public |
    BindingFlags.Static);