PersonalizationStateInfoCollection.SetReadOnly Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Marks the collection as read-only.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public void SetReadOnly()

Methods that attempt to modify a read-only collection, such as Add and Remove, throw a NotSupportedException exception.


You can call the SetReadOnly method multiple times on the collection; this will not raise an exception.

.NET Framework
Available since 2.0
Return to top