You are here: MessengerYouLike.IMSDK > IMSDK Reference > IMSDK Namespace > Classes > User Class > User Properties > User.TotalFriends Property
MessengerYouLike
User.TotalFriends Property

This Property shows total number of friends that this user has in its Contacts list

C#
public ReadOnly int TotalFriends;
Visual Basic
Public ReadOnly Property TotalFriends() As Integer

This property is Updated automatically as soon as any friend is added or removed the total friends count is updated 

when this event IMSDK.IMClient.OnFriendsListUpdated is fired this property is updated if needed

[Visual Basic]
 
'Create a new MCUser
 Public MCUser As New IMSDK.User
 
Private Sub MC_OnLoggedin(ByVal UserObject As IMSDK.User) Handles MC.OnLoggedin
        MCUser = New IMSDK.User
        MCUser = UserObject
        Msgbox("Total Friends " & MCUser.TotalFriends.ToString)
End Sub
 
Copyright (c) 2007. All rights reserved.