SmartFoxServer Silverlight API
SendObjectToGroup Method (obj, userList, roomId)
NamespacesSmartFoxClientAPISmartFoxClientSendObjectToGroup(SFSObject, List<(Of <(Int32>)>), Int32)
Send an SFSObject to a group of users in the room. See SendObject(SFSObject, Int32) for more info.
Declaration Syntax
C#Visual BasicVisual C++
public void SendObjectToGroup(
	SFSObject obj,
	List<int> userList,
	int roomId
)
Public Sub SendObjectToGroup ( _
	obj As SFSObject, _
	userList As List(Of Integer), _
	roomId As Integer _
)
public:
void SendObjectToGroup(
	SFSObject^ obj, 
	List<int>^ userList, 
	int roomId
)
Parameters
obj (SFSObject)
the SFSObject to be sent.
userList (List<(Of <(Int32>)>))
a list containing the id(s) of the recipients.
roomId (Int32)
the id of the target room, in case of multi-room join (optional, default value: activeRoomId).
Remarks

Sends:
SFSEvent..::.OnObjectReceivedDelegate

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to send a simple object with primitive data to two users.
CopyC#
  SFSObject move = new SFSObject();
  move.Put("x", 150);
  move.Put("y", 250);
  move.Put("speed", 8);
  smartFox.SendObject(move);

List<int> userList = new List<int>();
userList.Add(11);
userList.Add(12);

            smartFox.SendObjectToGroup(move, userList);
See Also

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