log4net SDK Reference

SystemInfo.AssemblyShortName Method 

Gets the short name of the Assembly.

[Visual Basic]
Public Shared Function AssemblyShortName( _
   ByVal myAssembly As Assembly _
) As String
[C#]
public static string AssemblyShortName(
   Assembly myAssembly
);

Parameters

myAssembly
The Assembly to get the name for.

Return Value

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

SystemInfo Class | log4net.Util Namespace