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



pType
pPropertyName
flags
Can be used in place of System.Type.GetProperty(System.String).

Syntax

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

Parameters

pType
pPropertyName
flags

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.