The SFSUserVariable object represents a SmartFoxServer User Variable entity on the client.

Namespace: Sfs2X.Entities.Variables
Assembly: SmartFox2X (in SmartFox2X.dll) Version: 1.7.3.0 (1.7.3)

Syntax

C#
public class SFSUserVariable : BaseVariable, 
	UserVariable, Variable

Remarks

This is a custom value attached to a User object that gets automatically synchronized between client and server on every change.

User Variables are particularly useful to store custom user data that must be "visible" to the other users, such as a profile, a score, a status message, etc. User Variables can be set by means of the SetUserVariablesRequest request; they support the data types listed in the class (also nested). A User Variable can also be null.

User Variables can be 'private' (starting from SFS2X v2.12 with client API v1.7): this flag allows to limit the visibility of variables to their owner only. In other words User Variables marked as private are not sent to other users, even if located in the same Room.

Inheritance Hierarchy

System..::..Object
  Sfs2X.Entities.Variables..::..BaseVariable
    Sfs2X.Entities.Variables..::..SFSUserVariable

See Also