Retrieves the specified public property whose parameters match the specified argument types and modifiers for the type of the current instance, using the specified binding constraints.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'宣言
Private Function GetProperty ( _
name As String, _
bindingAttr As BindingFlags, _
binder As Binder, _
returnType As Type, _
types As Type(), _
modifiers As ParameterModifier() _
) As PropertyInfo Implements IReflect.GetProperty
'使用
Dim instance As DataViewBrowseObject
Dim name As String
Dim bindingAttr As BindingFlags
Dim binder As Binder
Dim returnType As Type
Dim types As Type()
Dim modifiers As ParameterModifier()
Dim returnValue As PropertyInfo
returnValue = CType(instance, IReflect).GetProperty(name, _
bindingAttr, binder, returnType, _
types, modifiers)
PropertyInfo IReflect.GetProperty(
string name,
BindingFlags bindingAttr,
Binder binder,
Type returnType,
Type[] types,
ParameterModifier[] modifiers
)
private:
virtual PropertyInfo^ GetProperty(
String^ name,
BindingFlags bindingAttr,
Binder^ binder,
Type^ returnType,
array<Type^>^ types,
array<ParameterModifier>^ modifiers
) sealed = IReflect::GetProperty
JScript does not support explicit interface implementations.
Parameters
name
Type: System.StringThe name of the property to get.
bindingAttr
Type: System.Reflection.BindingFlagsA bitmask made up of one or more BindingFlags that specify how the search is conducted, or zero to return an empty array.
binder
Type: System.Reflection.BinderA 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; or a null reference (Nothing in Visual Basic) to use the DefaultBinder.
returnType
Type: System.TypeThe return type of the property.
types
Type: []An array of Type objects representing the number, order, and type of the parameters for the indexed property to get, or an empty Type array to get a property that is not indexed.
modifiers
Type: []An array of ParameterModifier objects representing the attributes associated with the corresponding element in the types array. The default binder does not process this parameter.
Return Value
Type: System.Reflection.PropertyInfo
A PropertyInfo object representing the specified property for the type of the current instance that matches the specified requirements, if found; otherwise, returns a null reference (Nothing in Visual Basic).
Implements
IReflect.GetProperty(String, BindingFlags, Binder, Type, [], [])
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.