System.Web.Security.MembershipUserCollection.SetReadOnly Method

Makes the contents of the membership user collection read-only.

Syntax

public void SetReadOnly ()

Remarks

The contents of a System.Web.Security.MembershipUserCollection are considered read-only, as they are a snapshot of the membership user information in the membership data store. Membership user information is modified using the Membership.UpdateUser(MembershipUser), erload:System.Web.Security.Membership.CreateUser and Membership.DeleteUser(string) methods. The MembershipUserCollection.SetReadOnly method marks the System.Web.Security.MembershipUserCollection as read-only so that System.Web.Security.MembershipUser objects cannot be added to or removed from the collection. Property values for the System.Web.Security.MembershipUser objects are not marked as read-only. That is, you can modify the property values of a System.Web.Security.MembershipUser in the System.Web.Security.MembershipUserCollection regardless of whether the collection has been marked as read-only by the MembershipUserCollection.SetReadOnly method.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0