Επεξεργασία

Κοινή χρήση μέσω


Application Constructor

Definition

Initializes a new instance of the Application class.

public:
 Application();
[System.Security.SecurityCritical]
public Application ();
public Application ();
Public Sub New ()
Attributes

Exceptions

More than one instance of the Application class is created per AppDomain.

Remarks

Only one instance of the Application class can be created per AppDomain, to ensure shared access to a single set of application-scope window, property, and resource data. Consequently, the parameterless constructor of the Application class detects whether the instance being initialized is the first instance in an AppDomain; if it is not, an InvalidOperationException is thrown.

The Application object for the current AppDomain is exposed from the static Current property.

Applies to