Export (0) Print
Expand All

Application.Shutdown Method (Int32)

Shuts down an application that returns the specified exit code to the operating system.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)

public void Shutdown (
	int exitCode
)
public void Shutdown (
	int exitCode
)
public function Shutdown (
	exitCode : int
)
You cannot use methods in XAML.

Parameters

exitCode

An Int32 value that represents the exit code for an application. The default exit code is 0.

You can handle the Exit event to set an exit code. However, if you explicitly call Shutdown, and you handle Exit to only set an exit code, you can call Shutdown instead.

This method can be called only from the thread that created the Application object.

Application Shutdown Sample shows the use of the Shutdown method overload.

  • UIPermission  for permission to use all windows and user input events without restriction. Associated enumeration: AllWindows

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft