System.Reflection.AssemblyName.SetPublicKey Method

Sets the public key identifying the assembly.

Syntax

public void SetPublicKey (byte[] publicKey)

Parameters

publicKey
A byte array containing the public key of the assembly.

Remarks

You must also use the AssemblyName.SetPublicKeyToken(Byte[]) method to provide a public key token. Otherwise, a System.Security.SecurityException is thrown when the AssemblyName.GetPublicKey method is called.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0