Assembly.CodeBase Property

 

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

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

abstract CodeBase : string with get
override CodeBase : string with get

Property Value

Type: System.String

The location of the assembly as specified originally.

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 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.

The following example uses the CodeBase property.

No code example is currently available or this language may not be supported.

FileIOPermission

for access to the path. Associated enumeration: FileIOPermissionAccess.PathDiscovery

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: