Share via


Membership Class

Represents a single user's membership in a single member group.

Inheritance Hierarchy

System.Object
  Microsoft.Office.Server.UserProfiles.PrivacyItem
    Microsoft.Office.Server.UserProfiles.Membership

Namespace:  Microsoft.Office.Server.UserProfiles
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Public Class Membership _
    Inherits PrivacyItem
'Usage
Dim instance As Membership
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public class Membership : PrivacyItem

Remarks

Membership is a first-class object in the UserProfiles object model. You can get to the memberships from the UserProfile object.

For more information about types of membership groups, see Memberships Overview. For a code example about how to create a member group and add a member to the newly created group, see How to: Create Memberships.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Membership Members

Microsoft.Office.Server.UserProfiles Namespace