Export (0) Print
Expand All

Assembly.GetEntryAssembly Method

Gets the process executable in the default application domain. In other application domains, this is the first executable that was executed by AppDomain.ExecuteAssembly.

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

public static Assembly GetEntryAssembly ()
public static Assembly GetEntryAssembly ()
public static function GetEntryAssembly () : Assembly

Return Value

The Assembly that is the process executable in the default application domain, or the first executable that was executed by AppDomain.ExecuteAssembly. Can return a null reference (Nothing in Visual Basic) when called from unmanaged code.

The GetEntryAssembly method can return a null reference (Nothing in Visual Basic) when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the GetEntryAssembly method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft