Click or drag to resize
TypeGetProperty Method (String, BindingFlags)
Searches for the specified property, using the specified binding constraints.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
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: PropertyInfo
An object representing the property that matches the specified requirements, if found; otherwise, null.

Implements

IReflectGetProperty(String, BindingFlags)
Exceptions
ExceptionCondition
AmbiguousMatchExceptionMore than one property is found with the specified name and matching the specified binding constraints. See Remarks.
ArgumentNullExceptionname is null.
See Also