語言

NameScope.Remove 方法

定義

將特定物件從收藏中移除。

多載

名稱 Description
Remove(KeyValuePair<String,Object>)

將特定物件從收藏中移除。

Remove(String)

從集合中移除指定名稱的映射。

Remove(KeyValuePair<String,Object>)

將特定物件從收藏中移除。

public:
 virtual bool Remove(System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^> item);
public bool Remove(System.Collections.Generic.KeyValuePair<string,object> item);
abstract member Remove : System.Collections.Generic.KeyValuePair<string, obj> -> bool
override this.Remove : System.Collections.Generic.KeyValuePair<string, obj> -> bool
Public Function Remove (item As KeyValuePair(Of String, Object)) As Boolean

參數

item
KeyValuePair<String,Object>

要從集合中移除的物件,指定為 KeyValuePair<TKey,TValue> (鍵為 String,值為 Object)。

傳回

true 如果項目成功從收藏中移除,否則 false。 如果該物品未在收藏中,也會退貨 false 。

實作

備註

由於 NameScope 是字典,因此沒有首次出現的概念;任何給定 KeyValuePair<TKey,TValue> 的都是唯一性的保證。

適用於

Remove(String)

從集合中移除指定名稱的映射。

public:
 virtual bool Remove(System::String ^ key);
public bool Remove(string key);
abstract member Remove : string -> bool
override this.Remove : string -> bool
Public Function Remove (key As String) As Boolean

參數

key
String

字串鍵,也就是要移除的 XAML 命名範圍映射的名稱。

傳回

true 如果項目成功從收藏中移除,否則 false。 如果該物品未在收藏中,也會退貨 false 。

實作

備註

此方法基本上是將 UnregisterName包裹 ,並在 false 本應在 中產生例外 UnregisterName的情況中回傳。

適用於