Click or drag to resize
TypeGetProperty Method (String, Type)
Searches for the public property with the specified name and return type.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public PropertyInfo GetProperty(
	string name,
	Type returnType
)

Parameters

name
Type: SystemString
The string containing the name of the public property to get.
returnType
Type: SystemType
The return type of the property.

Return Value

Type: PropertyInfo
An object representing the public property with the specified name, if found; otherwise, null.
Exceptions
ExceptionCondition
AmbiguousMatchExceptionMore than one property is found with the specified name.
ArgumentNullExceptionname is null, or returnType is null.
See Also