ObjectExtensionsGetAttributeFromT(PropertyInfo) Method

Get attribute from a property.

Definition

Namespace: Aliquo.Core
Assembly: Aliquo.Core (in Aliquo.Core.dll) Version: 5.0.9179.22651
C#
public static T GetAttributeFrom<T>(
	this PropertyInfo property
)
where T : Attribute

Parameters

property  PropertyInfo
PropertyInfo with the property to retrieve the attribute.

Type Parameters

T
The type of attribute to retrieve.

Return Value

T
An attribute from a property if found; otherwise, .

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PropertyInfo. 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).

See Also