MembershipUserCollection.SetReadOnly Method

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

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)

No code example is currently available or this language may not be supported.
public void SetReadOnly ()
public function SetReadOnly ()
Not applicable.

The contents of a 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 UpdateUser, CreateUser and DeleteUser methods. The SetReadOnly method marks the MembershipUserCollection as read-only so that MembershipUser objects cannot be added to or removed from the collection. Property values for the MembershipUser objects are not marked as read-only. That is, you can modify the property values of a MembershipUser in the MembershipUserCollection regardless of whether the collection has been marked as read-only by the SetReadOnly method.

The following code example returns all of the users from the membership data store. The MembershipUserCollection returned is marked as read-only based on a Boolean parameter specified by the caller.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: