Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MaxGamers Property

NetworkSession.MaxGamers Property

Gets or sets the maximum number of players able to join this multiplayer session.

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

public int MaxGamers { get; set; }

Property Value

Maximum number of players supported by the multiplayer session. Only the host can modify this value.

Exception typeCondition
ArgumentOutOfRangeException

MaxGamers must be between 2 and 31 players for Windows-based and Xbox 360-based games.

ObjectDisposedException

This NetworkSession is disposed.

InvalidOperationException

This NetworkSession is not the host; therefore, it cannot set the property MaxGamers.

Bb975778.note(en-us,XNAGameStudio.41).gifWindows Specific Information

For Windows-based games, MaxGamers must be between 2 and 31, where 31 is the maximum number of players supported in a session.

Bb975778.note(en-us,XNAGameStudio.41).gifXbox 360 Specific Information

For Xbox 360-based games, MaxGamers must be between 2 and 31, where 31 is the maximum number of players supported in a session.

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show:
© 2015 Microsoft