ObfuscateAssemblyAttribute.AssemblyIsPrivate Property

Note: This property is new in the .NET Framework version 2.0.

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

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)

public bool AssemblyIsPrivate { get; }
/** @property */
public boolean get_AssemblyIsPrivate ()

public function get AssemblyIsPrivate () : boolean

Property Value

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

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


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.

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, 

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions