Remove

PortionCollection.Remove method

从 ICollection 中移除特定对象的第一个实例。

public bool Remove(IPortion item)  
参数类型描述
itemIPortion要从 ICollection 中移除的对象。

返回值

如果 item 成功从 ICollection 中移除,则返回 true;否则返回 false。如果 item 在原始 ICollection 中未找到,此方法也将返回 false。

异常

异常条件
NotSupportedExceptionICollection 是只读的。

另请参阅