PersonalizationStateInfoCollection.Add(PersonalizationStateInfo) 方法
定义
将 PersonalizationStateInfo 派生实例添加到集合的结尾。Adds a PersonalizationStateInfo-derived instance to the end of the collection.
public:
void Add(System::Web::UI::WebControls::WebParts::PersonalizationStateInfo ^ data);
public void Add (System.Web.UI.WebControls.WebParts.PersonalizationStateInfo data);
member this.Add : System.Web.UI.WebControls.WebParts.PersonalizationStateInfo -> unit
Public Sub Add (data As PersonalizationStateInfo)
参数
要添加的 PersonalizationStateInfo 派生实例。The PersonalizationStateInfo-derived instance to be added.
例外
该集合已标记为只读。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.
data 参数为 null。The data parameter is null.
注解
此方法将 PersonalizationStateInfo 派生的实例添加到集合的末尾。This method adds a PersonalizationStateInfo-derived instance to the end of the collection. 在内部,集合的计数递增1。Internally, the count of the collection is incremented by one. 对于集合,当前处于活动状态的任何枚举器均无效。Any enumerators currently active against the collection are invalidated.