This method implements the corresponding ICustomAttributeProvider interface method. Therefore, the inherit parameter must be specified even though it is ignored.

Note:

In the .NET Framework version 2.0, this method returns security attributes if they are stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See Emitting Declarative Security Attributes.

A pseudo-attribute indicates bits of the core metadata that must be set when the attribute is present. Unlike a custom attribute that extends the metadata for a type and is saved along with the type, a pseudo-attribute modifies the metadata for the type and then is discarded. Some of the resulting bits cannot be accessed using existing reflection APIs.

The following table summarizes the different pseudo-attributes and the accessors for the bits that are available in reflection.

Pseudo-Attribute

Metadata Bits

Reflection Accessor

DllImportAttribute

CorPInvokeMap

DLL name

No accessor for PInvokeMap for ordinary method/global method attributes.