語言

PersonalizationStateInfoCollection.Remove(String, String) 方法

定義

從集合中移除一個 PersonalizationStateInfo-衍生物件。

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)

參數

path
String

要移除個人化狀態物件的相對應用路徑。

username
String

要移除的 -衍生物件的使用者名稱 UserPersonalizationStateInfo。

例外狀況

該收藏標示為唯讀。

path 為 null。

-或-

兩個參數皆為空。

備註

此方法從集合中移除一個 PersonalizationStateInfo-衍生的實例。 移除實例之後的元素會被移位至空缺位置。 內部則是收藏數量減少一。 目前反對該收藏的調查員均被宣告無效。

若僅 path 提供 ,則 SharedPersonalizationStateInfo 該路徑的實例將被移除。 若path同時提供 和username,則 UserPersonalizationStateInfo 與 path 的組合username實例被移除。

Note

你可以嘗試從收藏中移除不存在的項目;此舉不會提出例外。

適用於