SignedInGamer.GetFriends Method

Reads the friends list of this signed-in gamer, including the gamertag and current presence information for each friend.

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

Syntax

public FriendCollection GetFriends ()

Return Value

The friends of this local gamer.

Exceptions

Exception type Condition
ObjectDisposedException This object already has been disposed.
GamerPrivilegeException A signed-in gamer profile is required to perform this operation. An Xbox LIVE profile also may be required. There are no profiles currently signed in, or the profile is not signed in to Xbox LIVE.

Remarks

On Windows Phone, this method always returns an empty collection.

See Also

Reference

SignedInGamer Class
SignedInGamer Members
Microsoft.Xna.Framework.GamerServices Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP