SystemInfo AssemblyShortName Method | Apache log4net™ SDK Documentation

Gets the short name of the Assembly.

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public static string AssemblyShortName(
    	Assembly myAssembly
    )

    Public Shared Function AssemblyShortName (
    	myAssembly As Assembly
    ) As String

    public:
    static String^ AssemblyShortName(
    	Assembly^ myAssembly
    )

    static member AssemblyShortName :
            myAssembly : Assembly -> string

#### Parameters

myAssembly
  Type: System.Reflection
  Assembly
  The Assembly to get the name for.

#### Return Value

Type: String
The short name of the Assembly.
Remarks

The short name of the assembly is the FullName without the version, culture, or public key. i.e. it is just the assembly's file name without the extension.

Use this rather than Assembly.GetName().Name because that is not available on the Compact Framework.

Because of a FileIOPermission security demand we cannot do the obvious Assembly.GetName().Name. We are allowed to get the FullName of the assembly so we start from there and strip out just the assembly name.

See Also

#### Reference

SystemInfo Class
log4net.Util Namespace