See Also: ObfuscationAttribute Members
The System.Reflection.ObfuscationAttribute and System.Reflection.ObfuscateAssemblyAttribute 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 System.Reflection.ObfuscationAttribute attribute has a string ObfuscationAttribute.Feature 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 System.Reflection.ObfuscationAttribute 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 ObfuscationAttribute.Feature property is "all", enabling the complete set of obfuscation features.
When applied to an assembly, System.Reflection.ObfuscationAttribute also applies to all types within the assembly. If the ObfuscationAttribute.ApplyToMembers property is not specified, or is set to true, the attribute applies to all members as well. System.Reflection.ObfuscationAttribute does not specify whether an assembly is public or private. To specify whether an assembly is public or private, use the System.Reflection.ObfuscateAssemblyAttribute attribute.
When applied to classes and structures, System.Reflection.ObfuscationAttribute also applies to all members of the type if the ObfuscationAttribute.ApplyToMembers 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.