IdeaBlade DevForce 2010 Help Reference
GetProperty(Type,String) Method
See Also  Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core Namespace > ReflectionFns Class > GetProperty Method : GetProperty(Type,String) Method



pType
pPropertyName
Can be used in place of System.Type.GetProperty(System.String). Only finds public instance properties.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function GetProperty( _
   ByVal pType As Type, _
   ByVal pPropertyName As String _
) As PropertyInfo
Visual Basic (Usage)Copy Code
Dim pType As Type
Dim pPropertyName As String
Dim value As PropertyInfo
 
value = ReflectionFns.GetProperty(pType, pPropertyName)
C# 
public static PropertyInfo GetProperty( 
   Type pType,
   string pPropertyName
)
C++/CLI 
public:
static PropertyInfo^ GetProperty( 
   Type^ pType,
   String^ pPropertyName
) 

Parameters

pType
pPropertyName

Remarks

Should be used in place of Type.GetProperty(propertyName) because of problems with AmbiguousMatchException. When multiple public properties exist with the same name (can be caused by marking a property with 'new' in a derived class) this method returns the most derived class that implements the property.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.