Compartilhar via


Environment.ExitCode Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the exit code of the process.

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

Syntax

'Declaration
Public Shared Property ExitCode As Integer
public static int ExitCode { get; set; }

Property Value

Type: System.Int32
A 32-bit signed integer containing the exit code. The default value is zero.

Remarks

If the Main method returns void, you can use this property to set the exit code that will be returned to the calling environment. If Main does not return void, this property is ignored. The initial value of this property is zero.

You can use this property to return a success code from an application. For example, you can use it control the execution of a set of applications invoked by a script.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference