SmartFoxServer Silverlight API
GetActiveRoom Method
Namespaces ► SmartFoxClientAPI ► SmartFoxClient ► GetActiveRoom()()()
Get the currently active {@link Room} object.
SmartFoxServer allows users to join two or more rooms at the same time (multi-room join). If this feature is used, then this method is useless and the application should track the various room id(s) manually, for example by keeping them in an array.
Declaration Syntax

C# | Visual Basic | Visual C++

    public Room GetActiveRoom()

    Public Function GetActiveRoom As Room

    public:
    Room^ GetActiveRoom()

Return Value
the Room object of the currently active room; if the user joined more than one room, the last joined room is returned.
Remarks

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to retrieve the current room object.
CopyC#

    Room room = smartFox.GetActiveRoom();
    Debug.WriteLine("Current room is: " + room.GetName());

See Also
activeRoomId

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