PersonalizationStateInfoCollection.Add(PersonalizationStateInfo) Method

Definition

Adds a PersonalizationStateInfo-derived instance to the end of the collection.

C#
public void Add(System.Web.UI.WebControls.WebParts.PersonalizationStateInfo data);

Parameters

data
PersonalizationStateInfo

The PersonalizationStateInfo-derived instance to be added.

Exceptions

The collection was marked as read-only.

An attempt was made to add an object to the collection when an instance of the same shared or per-user state already exists in the collection.

The data parameter is null.

Remarks

This method adds a PersonalizationStateInfo-derived instance to the end of the collection. Internally, the count of the collection is incremented by one. Any enumerators currently active against the collection are invalidated.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1