Game.Run Method

Call this method to initialize the game, begin running the game loop, and start processing events for the game.

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

Syntax

public void Run ()

Exceptions

Exception type Condition
InvalidOperationException Run has been called multiple times in the same application.
ArgumentException

Invalid arguments have been requested for the creation of the graphics device.

Invalid back buffer options have been requested:

Invalid PresentationParameters.PresentationInterval option has been requested:

Invalid depth stencil options have been requested:

IsFullScreen is true, but:

IsFullScreen is false, but:

Remarks

This method calls the game Initialize and BeginRun methods before it begins the game loop and starts processing events for the game.

See Also

Reference

Game Class
Game Members
Microsoft.Xna.Framework Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP