| 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
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.
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