共用方式為


Game.OnExiting Method

Raises an Exiting event. Override this method to add code to handle when the game is exiting.

Syntax

'Declaration
Protected Overridable Sub OnExiting ( _
         sender As Object, _
         args As EventArgs _
)
protected virtual void OnExiting (
         Object sender,
         EventArgs args
)
protected:
virtual void OnExiting(
         Object sender,
         EventArgs args
)

Parameters

Remarks

The OnExiting method allows derived classes to handle the Exiting event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Requirements

Namespace: Microsoft.Xna.Framework

Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

See Also

Reference

Game Class
Game Members
Microsoft.Xna.Framework Namespace

Platforms

Windows Phone