TypeGetProperty Method (String, BindingFlags) |
Searches for the specified property, using the specified binding constraints.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public PropertyInfo GetProperty(
string name,
BindingFlags bindingAttr
)
Parameters
- name
- Type: SystemString
The string containing the name of the property to get. - bindingAttr
- Type: System.ReflectionBindingFlags
A bitmask comprised of one or more BindingFlags that specify how the search is conducted.-or- Zero, to return null.
Return Value
Type:
PropertyInfoAn object representing the property that matches the specified requirements, if found; otherwise, null.
Implements
IReflectGetProperty(String, BindingFlags)Exceptions Exception | Condition |
---|
AmbiguousMatchException | More than one property is found with the specified name and matching the specified binding constraints. See Remarks. |
ArgumentNullException | name is null. |
See Also