SmartFoxServer Silverlight API
RemoveBuddy Method (buddyName)
Namespaces ► SmartFoxClientAPI ► SmartFoxClient ► RemoveBuddy(String)
Remove a buddy from the buddy list.
Since SmartFoxServer Pro 1.6.0, the buddy list feature can be configured to use a basic or advanced security mode (see the SmartFoxServer server-side configuration file).
Check the following usage notes for details on the behavior of the removeBuddy method in the two cases.
Declaration Syntax

C# | Visual Basic | Visual C++

    public void RemoveBuddy(
    	string buddyName
    )

    Public Sub RemoveBuddy ( _
    	buddyName As String _
    )

    public:
    void RemoveBuddy(
    	String^ buddyName
    )

Parameters

buddyName (String)
  the name of the user to be removed from the buddy list.

Remarks

Usage Note:
Basic security mode
When a buddy is removed, the buddy list is updated and the {@link SFSEvent#onBuddyList} event is fired.

Advanced security mode
In addition to the basic behavior, if the <mutualRemoveBuddy> server-side configuration parameter is set to {@code true}, when user A removes user B from the buddy list, he/she is automatically removed from user B's buddy list.

Sends:
SFSEvent..::.OnBuddyListDelegate

History:
SmartFoxServer Pro v1.6.0 - Buddy list's advanced security mode implemented.

Version:
SmartFoxServer Basic (except advanced mode) / Pro

Examples
The following example shows how to remove a user from the buddy list.
CopyC#

    string buddyName = "jack";
    smartFox.RemoveBuddy(buddyName);

See Also
buddyList
AddBuddy(String)
SFSEvent..::.OnBuddyListDelegate

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