共用方式為


SignedInGamer.IsFriend Method

Queries whether the specified gamer is a friend of this local gamer.

Syntax

'Declaration
Public Function IsFriend ( _
         gamer As Gamer _
) As Boolean 
public bool IsFriend (
         Gamer gamer
)
public:
bool IsFriend(
         Gamer gamer
)

Parameters

  • gamer
    Type: Gamer
    The gamer to query.

Return Value

Type: Boolean
true if the specified gamer is a friend of the local gamer; false otherwise.

Exceptions

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

Requirements

Namespace: Microsoft.Xna.Framework.GamerServices

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

See Also

Reference

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

Platforms

Windows Phone