ObfuscationAttribute.Feature Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a string value that is recognized by the obfuscation tool, and which specifies processing options.
public:
property System::String ^ Feature { System::String ^ get(); void set(System::String ^ value); };
public string? Feature { get; set; }
public string Feature { get; set; }
member this.Feature : string with get, set
Public Property Feature As String
Property Value
A string value that is recognized by the obfuscation tool, and which specifies processing options. The default is "all".
Examples
The following code example shows a method that is marked with the value "default"
for the Feature property. It is necessary to specify false
for the Exclude property to avoid excluding MethodA
from obfuscation, because the default for the Exclude property is true
. The StripAfterObfuscation property is false
so that the obfuscation tool will not strip the attribute after obfuscation.
This code is part of a larger example that can be compiled and executed. See the ObfuscationAttribute class.
[ObfuscationAttribute(Exclude=false, Feature="default",
StripAfterObfuscation=false)]
public void MethodA() {}
<ObfuscationAttribute(Exclude:=False, _
Feature:="default", StripAfterObfuscation:=False)> _
Public Sub MethodA()
End Sub
Remarks
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.
Important
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.