TypeExtensionsGetPropertyExtended Method |
Namespace:
Xcalibur.Extensions
Assembly:
Xcalibur.Extensions (in Xcalibur.Extensions.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax public static PropertyInfo GetPropertyExtended(
this Type type,
string propertyName
)
<ExtensionAttribute>
Public Shared Function GetPropertyExtended (
type As Type,
propertyName As String
) As PropertyInfo
public:
[ExtensionAttribute]
static PropertyInfo^ GetPropertyExtended(
Type^ type,
String^ propertyName
)
[<ExtensionAttribute>]
static member GetPropertyExtended :
type : Type *
propertyName : string -> PropertyInfo
Parameters
- type
- Type: SystemType
The type. - propertyName
- Type: SystemString
Name of the property.
Return Value
Type:
PropertyInfoUsage 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
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Examples 1internal string GetPropertyExtendedExample<T>()
2{
3
4 const string propertyName = "PropertyName";
5
6
7 var property = typeof(T).GetPropertyExtended(propertyName);
8 return property != null
9 ? "That property exists!"
10 : "That property does not exist!";
11}
See Also