_Type.GetMembers _Type.GetMembers _Type.GetMembers _Type.GetMembers Method

定义

为 COM 对象提供对 GetMembers 方法的版本无关的访问。Provides COM objects with version-independent access to the GetMembers method.

重载

GetMembers() GetMembers() GetMembers() GetMembers()

为 COM 对象提供对 GetMembers() 方法的版本无关的访问。Provides COM objects with version-independent access to the GetMembers() method.

GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags)

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

注解

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

Type.GetMembers方法获取当前成员 (属性、 方法、 字段、 事件和等等) TypeThe Type.GetMembers method gets the members (properties, methods, fields, events, and so on) of the current Type.

GetMembers() GetMembers() GetMembers() GetMembers()

为 COM 对象提供对 GetMembers() 方法的版本无关的访问。Provides COM objects with version-independent access to the GetMembers() method.

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMembers();
public System.Reflection.MemberInfo[] GetMembers ();
abstract member GetMembers : unit -> System.Reflection.MemberInfo[]
Public Function GetMembers () As MemberInfo()

返回

表示当前 MemberInfo 的所有公共成员的 Type 对象数组。An array of MemberInfo objects representing all the public members of the current Type.

- 或 --or- 如果当前 MemberInfo 没有公共成员,则为 Type 类型的空数组。An empty array of type MemberInfo, if the current Type does not have public members.

注解

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

Type.GetMembers方法返回当前的所有公共成员TypeThe Type.GetMembers method returns all the public members of the current Type.

GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags)

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

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMembers(System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MemberInfo[] GetMembers (System.Reflection.BindingFlags bindingAttr);
abstract member GetMembers : System.Reflection.BindingFlags -> System.Reflection.MemberInfo[]
Public Function GetMembers (bindingAttr As BindingFlags) As MemberInfo()

参数

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

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

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

返回

表示为当前 MemberInfo 定义的匹配指定绑定约束的所有成员的 Type 对象数组。An array of MemberInfo objects representing all members defined for the current Type that match the specified binding constraints.

- 或 --or- 如果没有为当前 MemberInfo 定义的成员,或者如果没有一个定义的成员匹配绑定约束,则为 Type 类型的空数组。An empty array of type MemberInfo, if no members are defined for the current Type, or if none of the defined members match the binding constraints.

注解

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

Type.GetMembers方法搜索为当前定义的成员Type,使用指定的绑定约束。The Type.GetMembers method searches for the members defined for the current Type, using the specified binding constraints.

适用于