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 Attribute GetAttribute(
	this ICustomAttributeProvider reflectionObject,
	Type attributeType,
	bool inherit
)
Visual Basic (Declaration)
<ExtensionAttribute> _
Public Shared Function GetAttribute ( _
	reflectionObject As ICustomAttributeProvider, _
	attributeType As Type, _
	inherit As Boolean _
) As Attribute
Visual C++
[ExtensionAttribute]
public:
static Attribute^ GetAttribute(
	ICustomAttributeProvider^ reflectionObject, 
	Type^ attributeType, 
	bool inherit
)

Parameters

reflectionObject
Type: System.Reflection..::.ICustomAttributeProvider
L'objet de réflexion dont on veut récupérer un attribut
attributeType
Type: System..::.Type
Le type de l'attribut recherché
inherit
Type: System..::.Boolean
true pour rechercher aussi dans les ancêtres, false sinon

Return Value

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

See Also