Try to find a property or field from a given type.

Namespace: NHibernate.Mapping.ByCode
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public static MemberInfo GetPropertyOrFieldMatchingName(
	this Type source,
	string memberName
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function GetPropertyOrFieldMatchingName ( _
	source As Type, _
	memberName As String _
) As MemberInfo
Visual C++
[ExtensionAttribute]
public:
static MemberInfo^ GetPropertyOrFieldMatchingName(
	Type^ source, 
	String^ memberName
)

Parameters

source
Type: System..::..Type
The type
memberName
Type: System..::..String
The property or field name.

Return Value

A PropertyInfo or a FieldInfo where the member is found; null otherwise.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

Remarks

Where found the member is returned always from the declaring type.

See Also