c#เอารายชื่อของทุกช่องข้อมูลชั้นเรียน
using System.Reflection;
FieldInfo[] property_infos = typeof(Player).GetFields();
c#เรียกดูรายการของคุณสมบัติจากรายชื่อของวัตถุ
List<string> firstNames = people.Select(person => person.FirstName).ToList();
c#เอารายชื่อของทุกช่องข้อมูลชั้นเรียน
// 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);