我Type.GetMember
用来获取enum
会员。当我的枚举值为Equals
. 它返回Equals
从对象继承的方法。那么我怎么能只检索枚举成员而不是对象中的成员。
枚举
enum MyEnum{
Equals,
NotEquals
}
MemberInfo[] member = typeof(MyEnum).GetMember("Equals");
//Returns both Equals method from object and also the member from enum.
那么我怎么能单独得到Equals
from呢?enum