_Type.InvokeMember Método
Definição
Fornece objetos COM com acesso independente de versão para o método InvokeMember.Provides COM objects with version-independent access to the InvokeMember method.
Sobrecargas
Comentários
Este método é para acesso a classes gerenciadas de código não gerenciado e não deve ser chamado em código gerenciado.This method is for access to managed classes from unmanaged code, and should not be called from managed code.
O Type.InvokeMember método invoca um membro específico do atual Type .The Type.InvokeMember method invokes a specific member of the current Type.
..
InvokeMember(String, BindingFlags, Binder, Object, Object[])
Fornece objetos COM com acesso independente de versão para o método InvokeMember(String, BindingFlags, Binder, Object, Object[]).Provides COM objects with version-independent access to the InvokeMember(String, BindingFlags, Binder, Object, Object[]) method.
public:
System::Object ^ InvokeMember(System::String ^ name, System::Reflection::BindingFlags invokeAttr, System::Reflection::Binder ^ binder, System::Object ^ target, cli::array <System::Object ^> ^ args);
public object InvokeMember (string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args);
abstract member InvokeMember : string * System.Reflection.BindingFlags * System.Reflection.Binder * obj * obj[] -> obj
Public Function InvokeMember (name As String, invokeAttr As BindingFlags, binder As Binder, target As Object, args As Object()) As Object
Parâmetros
- name
- String
A String que contém o nome do construtor, do método, da propriedade ou do membro de campo a ser invocado.The String containing the name of the constructor, method, property, or field member to invoke.
- ou --or- Uma cadeia de caracteres vazia ("") para invocar o membro padrão.An empty string ("") to invoke the default member.
- ou --or- Para membros IDispatch, uma cadeia de caracteres que representa a DispID, por exemplo "[DispID=3]".For IDispatch members, a string representing the DispID, for example "[DispID=3]".
- invokeAttr
- BindingFlags
Um bitmask composto de um ou mais BindingFlags que especificam como a pesquisa é realizada.A bitmask comprised of one or more BindingFlags that specify how the search is conducted. O acesso pode ser um dos BindingFlags, como Public, NonPublic, Private, InvokeMethod, GetField e assim por diante.The access can be one of the BindingFlags such as Public, NonPublic, Private, InvokeMethod, GetField, and so on. O tipo de pesquisa não precisa ser especificado.The type of lookup need not be specified. Se o tipo de pesquisa for omitido, BindingFlags.Public | BindingFlags.Instance será aplicado.If the type of lookup is omitted, BindingFlags.Public | BindingFlags.Instance will apply.
- binder
- Binder
Um objeto Binder que define um conjunto de propriedades e habilita a associação, que pode envolver seleção de um método sobrecarregado, coerção de tipos de argumento e invocação de um membro por meio de reflexão.A Binder object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection.
- ou --or-
null, para usar o DefaultBinder.null, to use the DefaultBinder.
- target
- Object
O Object no qual invocar o membro especificado.The Object on which to invoke the specified member.
- args
- Object[]
Uma matriz que contém os argumentos que serão passados para o membro a ser invocado.An array containing the arguments to pass to the member to invoke.
Retornos
Um Object que representa o valor retornado do membro invocado.An Object representing the return value of the invoked member.
Comentários
Este método é para acesso a classes gerenciadas de código não gerenciado e não deve ser chamado em código gerenciado.This method is for access to managed classes from unmanaged code, and should not be called from managed code.
O Type.InvokeMember método invoca o membro especificado, usando as restrições de associação especificadas e correspondendo à lista de argumentos especificada.The Type.InvokeMember method invokes the specified member, using the specified binding constraints and matching the specified argument list.
Aplica-se a
InvokeMember(String, BindingFlags, Binder, Object, Object[], CultureInfo)
Fornece objetos COM com acesso independente de versão para o método InvokeMember(String, BindingFlags, Binder, Object, Object[], CultureInfo).Provides COM objects with version-independent access to the InvokeMember(String, BindingFlags, Binder, Object, Object[], CultureInfo) method.
public:
System::Object ^ InvokeMember(System::String ^ name, System::Reflection::BindingFlags invokeAttr, System::Reflection::Binder ^ binder, System::Object ^ target, cli::array <System::Object ^> ^ args, System::Globalization::CultureInfo ^ culture);
public object InvokeMember (string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Globalization.CultureInfo culture);
abstract member InvokeMember : string * System.Reflection.BindingFlags * System.Reflection.Binder * obj * obj[] * System.Globalization.CultureInfo -> obj
Public Function InvokeMember (name As String, invokeAttr As BindingFlags, binder As Binder, target As Object, args As Object(), culture As CultureInfo) As Object
Parâmetros
- name
- String
A String que contém o nome do construtor, do método, da propriedade ou do membro de campo a ser invocado.The String containing the name of the constructor, method, property, or field member to invoke.
- ou --or- Uma cadeia de caracteres vazia ("") para invocar o membro padrão.An empty string ("") to invoke the default member.
- ou --or- Para membros IDispatch, uma cadeia de caracteres que representa a DispID, por exemplo "[DispID=3]".For IDispatch members, a string representing the DispID, for example "[DispID=3]".
- invokeAttr
- BindingFlags
Um bitmask composto de um ou mais BindingFlags que especificam como a pesquisa é realizada.A bitmask comprised of one or more BindingFlags that specify how the search is conducted. O acesso pode ser um dos BindingFlags, como Public, NonPublic, Private, InvokeMethod, GetField e assim por diante.The access can be one of the BindingFlags such as Public, NonPublic, Private, InvokeMethod, GetField, and so on. O tipo de pesquisa não precisa ser especificado.The type of lookup need not be specified. Se o tipo de pesquisa for omitido, BindingFlags.Public | BindingFlags.Instance será aplicado.If the type of lookup is omitted, BindingFlags.Public | BindingFlags.Instance will apply.
- binder
- Binder
Um objeto Binder que define um conjunto de propriedades e habilita a associação, que pode envolver seleção de um método sobrecarregado, coerção de tipos de argumento e invocação de um membro por meio de reflexão.A Binder object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection.
- ou --or-
null, para usar o DefaultBinder.null, to use the DefaultBinder.
- target
- Object
O Object no qual invocar o membro especificado.The Object on which to invoke the specified member.
- args
- Object[]
Uma matriz que contém os argumentos que serão passados para o membro a ser invocado.An array containing the arguments to pass to the member to invoke.
- culture
- CultureInfo
O objeto CultureInfo que representa a localidade de globalização a ser usada, que pode ser necessária para realizar conversões específicas de localidade, como converter uma String numérica em uma Double.The CultureInfo object representing the globalization locale to use, which may be necessary for locale-specific conversions, such as converting a numeric String to a Double.
- ou --or-
null para usar o CultureInfo atual do thread.null to use the current thread's CultureInfo.
Retornos
Um Object que representa o valor retornado do membro invocado.An Object representing the return value of the invoked member.
Comentários
Este método é para acesso a classes gerenciadas de código não gerenciado e não deve ser chamado em código gerenciado.This method is for access to managed classes from unmanaged code, and should not be called from managed code.
O Type.InvokeMember método invoca o membro especificado, usando as restrições de associação especificadas e correspondendo à lista de argumentos especificada e à cultura.The Type.InvokeMember method invokes the specified member, using the specified binding constraints and matching the specified argument list and culture.
Aplica-se a
InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])
Fornece objetos COM com acesso independente de versão para o método InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]).Provides COM objects with version-independent access to the InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) method.
public:
System::Object ^ InvokeMember(System::String ^ name, System::Reflection::BindingFlags invokeAttr, System::Reflection::Binder ^ binder, System::Object ^ target, cli::array <System::Object ^> ^ args, cli::array <System::Reflection::ParameterModifier> ^ modifiers, System::Globalization::CultureInfo ^ culture, cli::array <System::String ^> ^ namedParameters);
public object InvokeMember (string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters);
abstract member InvokeMember : string * System.Reflection.BindingFlags * System.Reflection.Binder * obj * obj[] * System.Reflection.ParameterModifier[] * System.Globalization.CultureInfo * string[] -> obj
Public Function InvokeMember (name As String, invokeAttr As BindingFlags, binder As Binder, target As Object, args As Object(), modifiers As ParameterModifier(), culture As CultureInfo, namedParameters As String()) As Object
Parâmetros
- name
- String
A String que contém o nome do construtor, do método, da propriedade ou do membro de campo a ser invocado.The String containing the name of the constructor, method, property, or field member to invoke.
- ou --or- Uma cadeia de caracteres vazia ("") para invocar o membro padrão.An empty string ("") to invoke the default member.
- ou --or- Para membros IDispatch, uma cadeia de caracteres que representa a DispID, por exemplo "[DispID=3]".For IDispatch members, a string representing the DispID, for example "[DispID=3]".
- invokeAttr
- BindingFlags
Um bitmask composto de um ou mais BindingFlags que especificam como a pesquisa é realizada.A bitmask comprised of one or more BindingFlags that specify how the search is conducted. O acesso pode ser um dos BindingFlags, como Public, NonPublic, Private, InvokeMethod, GetField e assim por diante.The access can be one of the BindingFlags such as Public, NonPublic, Private, InvokeMethod, GetField, and so on. O tipo de pesquisa não precisa ser especificado.The type of lookup need not be specified. Se o tipo de pesquisa for omitido, BindingFlags.Public | BindingFlags.Instance será aplicado.If the type of lookup is omitted, BindingFlags.Public | BindingFlags.Instance will apply.
- binder
- Binder
Um objeto Binder que define um conjunto de propriedades e habilita a associação, que pode envolver seleção de um método sobrecarregado, coerção de tipos de argumento e invocação de um membro por meio de reflexão.A Binder object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection.
- ou --or-
null, para usar o DefaultBinder.null, to use the DefaultBinder.
- target
- Object
O Object no qual invocar o membro especificado.The Object on which to invoke the specified member.
- args
- Object[]
Uma matriz que contém os argumentos que serão passados para o membro a ser invocado.An array containing the arguments to pass to the member to invoke.
- modifiers
- ParameterModifier[]
Uma matriz de objetos ParameterModifier que representam os atributos associados ao elemento correspondente na matriz args.An array of ParameterModifier objects representing the attributes associated with the corresponding element in the args array. Os atributos associados ao parâmetro são armazenados na assinatura do membro.A parameter's associated attributes are stored in the member's signature. O associador padrão não processa este parâmetro.The default binder does not process this parameter.
- culture
- CultureInfo
O objeto CultureInfo que representa a localidade de globalização a ser usada, que pode ser necessária para realizar conversões específicas de localidade, como converter uma String numérica em uma Double.The CultureInfo object representing the globalization locale to use, which may be necessary for locale-specific conversions, such as converting a numeric String to a Double.
- ou --or-
null para usar o CultureInfo atual do thread.null to use the current thread's CultureInfo.
- namedParameters
- String[]
Uma matriz que contém os nomes dos parâmetros para os quais os valores na matriz args são passados.An array containing the names of the parameters to which the values in the args array are passed.
Retornos
Um Object que representa o valor retornado do membro invocado.An Object representing the return value of the invoked member.
Comentários
Este método é para acesso a classes gerenciadas de código não gerenciado e não deve ser chamado em código gerenciado.This method is for access to managed classes from unmanaged code, and should not be called from managed code.
O Type.InvokeMember método invoca o membro especificado, usando as restrições de associação especificadas e correspondendo à lista de argumentos, aos modificadores e à cultura especificados.The Type.InvokeMember method invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers, and culture.