AssemblyName.HashAlgorithm Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the hash algorithm used by the assembly manifest.

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

member HashAlgorithm : AssemblyHashAlgorithm with get, set

Property Value

Type: System.Configuration.Assemblies.AssemblyHashAlgorithm

The hash algorithm used by the assembly manifest.


Starting with the .NET Framework 4, the HashAlgorithm property of an AssemblyName object that is returned by the Assembly.GetReferencedAssemblies method is AssemblyHashAlgorithm.None if there is no hash algorithm for the referenced assembly, or if the hash algorithm of the referenced assembly is not identified by the System.Configuration.Assemblies.AssemblyHashAlgorithm enumeration. In previous versions of the .NET Framework, the HashAlgorithm property returned AssemblyHashAlgorithm.SHA1 in this situation. 

The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the HashAlgorithm property is used to set the hash algorithm for the assembly manifest.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top