Redigera

Dela via


ObfuscateAssemblyAttribute.AssemblyIsPrivate Property

Definition

Gets a Boolean value indicating whether the assembly was marked private.

public:
 property bool AssemblyIsPrivate { bool get(); };
public bool AssemblyIsPrivate { get; }
member this.AssemblyIsPrivate : bool
Public ReadOnly Property AssemblyIsPrivate As Boolean

Property Value

true if the assembly was marked private; otherwise, false.

Examples

The following code example shows how the attribute constructor sets the AssemblyIsPrivate property to true, to specify that an assembly is private. The StripAfterObfuscation property is false, to prevent the obfuscation tool from stripping the attribute after processing.

using System;
using System.Reflection;

[assembly: ObfuscateAssemblyAttribute(true,
    StripAfterObfuscation=false)]
Imports System.Reflection

<Assembly: ObfuscateAssemblyAttribute(False, _
    StripAfterObfuscation:=False)>

Remarks

A private assembly is used only by the application of which it is a part, and not by other software.

Important

Applying this attribute does not automatically obfuscate the assembly. 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.

Applies to