This documentation is archived and is not being maintained.

Attribute.GetCustomAttributes Method (Assembly)

.NET Framework 1.1

Retrieves an array of the custom attributes of a specified type applied to a specified assembly or inherited from a base class.

[Visual Basic]
Overloads Public Shared Function GetCustomAttributes( _
   ByVal element As Assembly _
) As Attribute()
public static Attribute[] GetCustomAttributes(
 Assembly element
public: static Attribute* GetCustomAttributes(
 Assembly* element
) [];
public static function GetCustomAttributes(
   element : Assembly
) : Attribute[];


An object derived from class Assembly that describes a reusable, versionable, collection of modules.

Return Value

An Attribute array containing the custom attributes applied to element.


An empty array if no such custom attributes exist.


Exception Type Condition
ArgumentNullException element or attributeType is a null reference (Nothing in Visual Basic).


Return value contains the custom attributes for ancestors of element.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Attribute Class | Attribute Members | System Namespace | Attribute.GetCustomAttributes Overload List