AssemblyName.HashAlgorithm Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com 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.

System_CAPS_importantImportant

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
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: