Documentation de Dvp.Net. Forum : http://www.developpez.net/forums/f1239/applications/projets/projets-heberges/dvp-net/

[Ceci est une documentation préliminaire, sous réserve de modification.]

Récupère un attribut appliqué à un objet de réflexion.

Namespace:  Developpez.Dotnet.Reflection
Assembly:  Developpez.Dotnet (in Developpez.Dotnet.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static T GetAttribute<T>(
	this ICustomAttributeProvider reflectionObject
)
where T : Attribute
Visual Basic (Declaration)
<ExtensionAttribute> _
Public Shared Function GetAttribute(Of T As Attribute) ( _
	reflectionObject As ICustomAttributeProvider _
) As T
Visual C++
[ExtensionAttribute]
public:
generic<typename T>
where T : Attribute
static T GetAttribute(
	ICustomAttributeProvider^ reflectionObject
)

Parameters

reflectionObject
Type: System.Reflection..::.ICustomAttributeProvider
L'objet de réflexion dont on veut récupérer un attribut

Type Parameters

T
Le type de l'attribut recherché

Return Value

L'attribut recherché s'il existe, null sinon

See Also