mscorlib 2.0.0.0 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Enum | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Event | System.AttributeTargets.Interface | System.AttributeTargets.Parameter | System.AttributeTargets.Delegate | System.AttributeTargets.All, AllowMultiple=true, Inherited=false) System.Runtime.InteropServices.ComVisible(true)

The and attributes allow assembly authors to annotate their binaries so that obfuscation tools can process them correctly with minimal external configuration.

Applying this attribute does not automatically obfuscate the code entity to which you apply it. Applying the attribute is an alternative to creating a configuration file for the obfuscation tool. That is, it merely provides instructions for an obfuscation tool. Microsoft recommends that vendors of obfuscation tools follow the semantics described here. However, there is no guarantee that a particular tool follows Microsoft recommendations.

The attribute has a string property. Obfuscation tools can map the string values of this property to features they implement, preferably by using an XML configuration file that users can access. The defines two feature strings, "default" and "all". The string "default" should map to the default obfuscation features of a tool, and "all" should map to the complete set of obfuscation features supported by a tool. The default value of the property is "all", enabling the complete set of obfuscation features.

When applied to an assembly, also applies to all types within the assembly. If the property is not specified, or is set to true, the attribute applies to all members as well. does not specify whether an assembly is public or private. To specify whether an assembly is public or private, use the attribute.

When applied to classes and structures, also applies to all members of the type if the property is not specified, or is set to true.

When applied to methods, parameters, fields, and properties, the attribute affects only the entity to which it is applied.

Instructs obfuscation tools to take the specified actions for an assembly, type, or member.

- Constructor
  2.0.0.0
  4.0.0.0

  does not specify whether an assembly is public or private. To specify whether an assembly is public or private, use .

  Initializes a new instance of the class.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The value of this property is ignored when the attribute is applied to a member.

  Applying this attribute does not automatically obfuscate the code entity to which you apply it. Applying the attribute is an alternative to creating a configuration file for the obfuscation tool. That is, it merely provides instructions for an obfuscation tool. Microsoft recommends that vendors of obfuscation tools follow the semantics described here. However, there is no guarantee that a particular tool follows Microsoft recommendations.

  Gets or sets a value indicating whether the attribute of a type is to apply to the members of the type.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  Applying this attribute does not automatically obfuscate the code entity to which you apply it. Applying the attribute is an alternative to creating a configuration file for the obfuscation tool. That is, it merely provides instructions for an obfuscation tool. Microsoft recommends that vendors of obfuscation tools follow the semantics described here. However, there is no guarantee that a particular tool follows Microsoft recommendations.

  Gets or sets a value indicating whether the obfuscation tool should exclude the type or member from obfuscation.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The value passed to this property depends on the obfuscation tool used. It is recommended that vendors of obfuscation tools support at least "default" and "all". Vendors can use these settings in conjunction with the XML configuration file.

  Applying this attribute does not automatically obfuscate the code entity to which you apply it. Applying the attribute is an alternative to creating a configuration file for the obfuscation tool. That is, it merely provides instructions for an obfuscation tool. Microsoft recommends that vendors of obfuscation tools follow the semantics described here. However, there is no guarantee that a particular tool follows Microsoft recommendations.

  Gets or sets a string value that is recognized by the obfuscation tool, and which specifies processing options.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  Attributes should not be stripped if your library will be included as part of another application, and obfuscated as part of that application.

  Applying this attribute does not automatically obfuscate the code entity to which you apply it. Applying the attribute is an alternative to creating a configuration file for the obfuscation tool. That is, it merely provides instructions for an obfuscation tool. Microsoft recommends that vendors of obfuscation tools follow the semantics described here. However, there is no guarantee that a particular tool follows Microsoft recommendations.

  Gets or sets a value indicating whether the obfuscation tool should remove this attribute after processing.