PersonalizationStateInfoCollection.Remove(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes a PersonalizationStateInfo-derived object from the collection.
public:
void Remove(System::String ^ path, System::String ^ username);
public void Remove (string path, string username);
member this.Remove : string * string -> unit
Public Sub Remove (path As String, username As String)
Parameters
- path
- String
The relative application path of the personalization state object to be removed.
- username
- String
The user name of the UserPersonalizationStateInfo-derived object to be removed.
Exceptions
The collection was marked as read-only.
Remarks
This method removes a PersonalizationStateInfo-derived instance from the collection. Any elements after the removed instance are moved up to occupy the vacant position. Internally, the count of the collection is decremented by one. Any enumerators currently active against the collection are invalidated.
If only path
is provided, then the SharedPersonalizationStateInfo instance for that path is removed. If both path
and username
are provided, then the UserPersonalizationStateInfo instance for the combination of path
and username
is removed.
Note
You can try to remove a non-existing item from the collection; this action will not raise an exception.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈