Edit

Share via


MembershipUserCollection.Add(MembershipUser) Method

Definition

Adds the specified membership user to the collection.

public:
 void Add(System::Web::Security::MembershipUser ^ user);
public void Add (System.Web.Security.MembershipUser user);
member this.Add : System.Web.Security.MembershipUser -> unit
Public Sub Add (user As MembershipUser)

Parameters

user
MembershipUser

A MembershipUser object to add to the collection.

Exceptions

The collection is read-only.

The UserName of the user is null.

A MembershipUser object with the same UserName value as user already exists in the collection.

Remarks

The Add method is commonly used by membership provider implementations of the GetAllUsers, FindUsersByEmail, and FindUsersByName methods of the MembershipProvider abstract class.

Applies to

See also