SmartFoxServer Silverlight API
GetBuddyRoom Method (buddy)
Namespaces ► SmartFoxClientAPI ► SmartFoxClient ► GetBuddyRoom(Buddy)
Request the room id(s) of the room(s) where a buddy is currently located into.
Declaration Syntax

C# | Visual Basic | Visual C++

    public void GetBuddyRoom(
    	Buddy buddy
    )

    Public Sub GetBuddyRoom ( _
    	buddy As Buddy _
    )

    public:
    void GetBuddyRoom(
    	Buddy^ buddy
    )

Parameters

buddy (Buddy)
  a buddy object taken from the buddyList hashtable.

Remarks

Sends:
SFSEvent..::.OnBuddyRoomDelegate

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to join the same room of a buddy.
CopyC#

    SFSEvent.onBuddyRoom += OnBuddyRoom;

    Buddy buddy = smartFox.GetBuddyByName("jack");
    smartFox.GetBuddyRoom(buddy);

    public void OnBuddyRoom(List<int> idList)
    {
        // Reach the buddy in his room
        smartFox.Join(idList[0]);
    }

See Also
buddyList
SFSEvent..::.OnBuddyRoomDelegate

Assembly: SmartFoxClientAPI_Silverlight (Module: SmartFoxClientAPI_Silverlight) Version: 1.0.0.0 (1.0.0.0)