| ExtensionsReflectionGetPropertyValueT Method (Object, String) |
Searches for the specified property, using the specified binding constraints and returns
its value.
Default
BindingFlags are
Instance and
Public
Namespace:
Cauldron
Assembly:
Cauldron.Activator (in Cauldron.Activator.dll) Version: 3.2.0.2
Syntax public static T GetPropertyValue<T>(
this Object obj,
string propertyName
)
Parameters
- obj
- Type: SystemObject
The Object to retrieve the value from - propertyName
- Type: SystemString
The string containing the name of the property to get.
Type Parameters
- T
- The property's return value type
Return Value
Type:
TThe property value of the specified object.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions See Also