Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Reflection.​AssemblyName

Assembly: System.Runtime

Inheritance: object → AssemblyName

Implemented Interfaces

Describes an assembly's unique identity in full.

Properties

public string
CodeBase
Gets or sets the location of the assembly as a URL.
ContentType
Gets or sets a value that indicates what type of content the assembly contains.
CultureInfo
Gets or sets the culture supported by the assembly.
public string
CultureName
Gets or sets the name of the culture associated with the assembly.
public string
EscapedCodeBase
Gets the URI, including escape characters, that represents the codebase.
Flags
Gets or sets the attributes of the assembly.
public string
FullName
Gets the full name of the assembly, also known as the display name.
Gets or sets the hash algorithm used by the assembly manifest.
KeyPair
Gets or sets the public and private cryptographic key pair that is used to create a strong name signature for the assembly.
public string
Name
Gets or sets the simple name of the assembly. This is usually, but not necessarily, the file name of the manifest file of the assembly, minus its extension.
ProcessorArchitecture
Gets or sets a value that identifies the processor and bits-per-word of the platform targeted by an executable.
public Version
Version
Gets or sets the major, minor, build, and revision numbers of the assembly.
Gets or sets the information related to the assembly's compatibility with other assemblies.

Methods

public object
Clone​()
Makes a copy of this <see cref="T:System.Reflection.AssemblyName" /> object.
Returns An object that is a copy of this <see cref="T:System.Reflection.AssemblyName" /> object.
public static AssemblyName
GetAssemblyName​(string assemblyFile)
Gets the <see cref="T:System.Reflection.AssemblyName" /> for a given file.
Returns An object that represents the given assembly file.
assemblyFile The path for the assembly whose <see cref="T:System.Reflection.AssemblyName" /> is to be returned.
public void
GetObjectData​(Runtime.​Serialization.​SerializationInfo info, Runtime.​Serialization.​StreamingContext context)
Gets serialization information with all the data needed to recreate an instance of this <see langword="AssemblyName" /> .
info The object to be populated with serialization information.
context The destination context of the serialization.
public byte[]
GetPublicKey​()
Gets the public key of the assembly.
Returns A byte array that contains the public key of the assembly.
public byte[]
GetPublicKeyToken​()
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.
Returns A byte array that contains the public key token.
public void
OnDeserialization​(object sender)
Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and is called back by the deserialization event when deserialization is complete.
sender The source of the deserialization event.
public static bool
ReferenceMatchesDefinition​(AssemblyName reference, AssemblyName definition)
Returns a value indicating whether two assembly names are the same. The comparison is based on the simple assembly names.
Returns <see langword="true" /> if the simple assembly names are the same; otherwise, <see langword="false" /> .
reference The reference assembly name.
definition The assembly name that is compared to the reference assembly.
public void
SetPublicKey​(byte[] publicKey)
Sets the public key identifying the assembly.
publicKey A byte array containing the public key of the assembly.
public void
SetPublicKeyToken​(byte[] publicKeyToken)
Sets 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.
publicKeyToken A byte array containing the public key token of the assembly.
public string
ToString​()
Returns the full name of the assembly, also known as the display name.
Returns The full name of the assembly, or the class name if the full name cannot be determined.
public bool
Equals​(object obj)
Inherited from object
Determines whether the specified object is equal to the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
obj The object to compare with the current object.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public int
GetHashCode​()
Inherited from object
Serves as the default hash function.
Returns A hash code for the current object.
public Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .