System.Reflection.Assembly.CodeBase Property

Gets the location of the assembly as specified originally, for example, in an System.Reflection.AssemblyName object.

Syntax

public virtual string CodeBase { get; }

Value

Absolute path from which the assembly was originally loaded.

Remarks

To get the absolute path to the loaded manifest-containing file, use the Assembly.Location property instead.

If the assembly was loaded as a byte array, using an overload of the erload:System.Reflection.Assembly.Load method that takes an array of bytes, this property returns the location of the caller of the method, not the location of the loaded assembly.

Requirements

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