System.Reflection.AssemblyName.CodeBase Property

Gets or sets the location of the assembly as a URL.

Syntax

public string CodeBase { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

When an assembly is loaded, this value can also be obtained using the Assembly.CodeBase property.

If the assembly was loaded as a byte array, this property returns the location of the caller of the Assembly.Load(Byte[]) method overload, not the location of the loaded assembly.

Note:

Do not use an System.Reflection.AssemblyName with only the AssemblyName.CodeBase property set. The AssemblyName.CodeBase property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the Assembly.Load(AssemblyName) method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the Assembly.LoadFrom(string) method overload or Best Practices for Assembly Loading.

Requirements

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