FieldInfo có một thành viên IsStatic, nhưng PropertyInfo thì không. Tôi cho rằng tôi chỉ nhìn những gì tôi cần.Trong C#, làm cách nào tôi có thể biết được thuộc tính tĩnh? (.Net CF 2.0)
Type type = someObject.GetType();
foreach (PropertyInfo pi in type.GetProperties())
{
// umm... Not sure how to tell if this property is static
}
'BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy' đã làm việc cho tôi. –