Click or drag to resize

NeonServiceExit Method

Used by services to stop themselves, specifying an optional process exit code.

Namespace:  Neon.Service
Assembly:  Neon.Service (in Neon.Service.dll) Version: 2.14.0
public virtual void Exit(
	int exitCode = 0


exitCode (Optional)
Type: SystemInt32
The optional exit code (defaults to 0).
This works by setting ExitCode if exitCode is non-zero, signalling process termination on another thread and then throwing a ProgramExitException on the current thread. This will generally cause the current thread or task to terminate immediately and any other properly implemented threads and tasks to terminate gracefully when they receive the termination signal.
See Also