_Type.FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) Method


为 COM 对象提供对 FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) 方法的与版本无关的访问。Provides COM objects with version-independent access to the FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) method.

 cli::array <System::Reflection::MemberInfo ^> ^ FindMembers(System::Reflection::MemberTypes memberType, System::Reflection::BindingFlags bindingAttr, System::Reflection::MemberFilter ^ filter, System::Object ^ filterCriteria);
public System.Reflection.MemberInfo[] FindMembers (System.Reflection.MemberTypes memberType, System.Reflection.BindingFlags bindingAttr, System.Reflection.MemberFilter filter, object filterCriteria);
abstract member FindMembers : System.Reflection.MemberTypes * System.Reflection.BindingFlags * System.Reflection.MemberFilter * obj -> System.Reflection.MemberInfo[]
Public Function FindMembers (memberType As MemberTypes, bindingAttr As BindingFlags, filter As MemberFilter, filterCriteria As Object) As MemberInfo()



指示要搜索的成员类型的 MemberTypes 对象。A MemberTypes object indicating the type of member to search for.


一个位屏蔽,由一个或多个指定搜索执行方式的 BindingFlags 组成。A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-or- 零,以返回 nullZero, to return null.


执行比较的委托,如果当前被检查的成员匹配 true,则返回 filterCriteria;否则返回 falseThe delegate that does the comparisons, returning true if the member currently being inspected matches the filterCriteria and false otherwise. 可以使用该类提供的 FilterAttributeFilterNameFilterNameIgnoreCase 委托。You can use the FilterAttribute, FilterName, and FilterNameIgnoreCase delegates supplied by this class. 第一个委托使用 FieldAttributesMethodAttributesMethodImplAttributes 的字段作为搜索判据,另两个委托使用 String 对象作为搜索判据。The first uses the fields of FieldAttributes, MethodAttributes, and MethodImplAttributes as search criteria, and the other two delegates use String objects as the search criteria.


确定成员是否在 MemberInfo 对象数组中返回的搜索判据。The search criteria that determines whether a member is returned in the array of MemberInfo objects.

FieldAttributesMethodAttributesMethodImplAttributes 的字段可以和该类提供的 FilterAttribute 委托一起使用。The fields of FieldAttributes, MethodAttributes, and MethodImplAttributes can be used in conjunction with the FilterAttribute delegate supplied by this class.



指定成员类型的 MemberInfo 对象的筛选数组。A filtered array of MemberInfo objects of the specified member type.

-or- 如果当前 MemberInfo 没有匹配筛选判据的 Type 类型成员,则为 memberType 类型的空数组。An empty array of type MemberInfo, if the current Type does not have members of type memberType that match the filter criteria.


此方法用于从非托管代码访问托管类,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.FindMembers 方法返回指定成员类型的 MemberInfo 对象的筛选数组。The Type.FindMembers method returns a filtered array of MemberInfo objects of the specified member type.

Applies to