Share via


AssemblyKeyNameAttribute Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Specifies the name of a key container within the CSP containing the key pair used to generate a strong name.

Inheritance Hierarchy

System. . :: . .Object
  System. . :: . .Attribute
    System.Reflection..::..AssemblyKeyNameAttribute

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

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple := False)> _
Public NotInheritable Class AssemblyKeyNameAttribute _
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = false)]
public sealed class AssemblyKeyNameAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Assembly, AllowMultiple = false)]
public ref class AssemblyKeyNameAttribute sealed : public Attribute
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = false)>]
type AssemblyKeyNameAttribute =  
    class
        inherit Attribute
    end
public final class AssemblyKeyNameAttribute extends Attribute

The AssemblyKeyNameAttribute type exposes the following members.

Constructors

  Name Description
Public method AssemblyKeyNameAttribute Initializes a new instance of the AssemblyKeyNameAttribute class with the name of the container holding the key pair used to generate a strong name for the assembly being attributed.

Top

Properties

  Name Description
Public property KeyName Gets the name of the container having the key pair that is used to generate a strong name for the attributed assembly.

Top

Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

When building a strong-named assembly, the author must supply either this attribute or AssemblyKeyFileAttribute.

An example of the syntax is [assembly:AssemblyKeyNameAttribute("myContainer")].

The classes in System.Runtime.CompilerServices are intended for use by compilers only. Do not use them unless you are building a compiler.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Reflection Namespace