語言

ICollectionContract<C>.Remove(C) 方法

定義

移除 中 中 特定節點的首次出現IContractICollectionContract<C>。

public:
 bool Remove(C item);
public bool Remove(C item);
abstract member Remove : 'C -> bool
Public Function Remove (item As C) As Boolean

參數

item
C

IContract從 中移除ICollectionContract<C>。

傳回

true 若 item 成功移除;否則, false。 如果在 List 中没有找到 item,则此方法也会返回 false。

例外狀況

備註

要判斷 a ICollectionContract<C> 是否為唯讀,請呼叫該 GetIsReadOnly 方法。

適用於