AssemblyName.GetPublicKeyToken Method ()

 

Gets the public key token, which is the last 8 bytes of the SHA-1 hash of the public key under which the application or assembly is signed.

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

member GetPublicKeyToken : unit -> byte[]

Return Value

Type: System.Byte[]

A byte array that contains the public key token.

The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the SetPublicKeyToken method is used to set the assembly's public key token. The GetPublicKeyToken method is then used to retrieve the public key token, which is displayed to the console.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: