Gets the short name of the Assembly.
Assembly: log4net (in log4net.dll) Version: 18.104.22.168-.NET 4.0
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
- Type: System.ReflectionAssembly
The Assembly to get the name for.
Return ValueType: String
The short name of the Assembly.
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.