共用方式為


ViewDataDictionary.Remove 方法

定義

多載

Remove(KeyValuePair<String,Object>)

從集合中移除第一次出現的指定物件。

Remove(String)

使用指定索引鍵從集合中移除項目。

Remove(KeyValuePair<String,Object>)

從集合中移除第一次出現的指定物件。

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>

要從集合中移除的物件。

傳回

如果已成功從集合中移除,則 item 為 true;否則為 false。 如果在 item 集合中找不到 ,這個方法也會傳回 false。

實作

例外狀況

集合是唯讀的。

適用於

Remove(String)

使用指定索引鍵從集合中移除項目。

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

要移除的項目索引鍵。

傳回

如果成功移除項目則為 true,否則為 false。 如果在 key 原創組合中找不到 ,這個方法也會傳回 false。

實作

例外狀況

集合是唯讀的。

key 為 null。

適用於