TextDecorationCollection.TryRemove(IEnumerable<TextDecoration>, TextDecorationCollection) TextDecorationCollection.TryRemove(IEnumerable<TextDecoration>, TextDecorationCollection) TextDecorationCollection.TryRemove(IEnumerable<TextDecoration>, TextDecorationCollection) TextDecorationCollection.TryRemove(IEnumerable<TextDecoration>, TextDecorationCollection) Method

定义

从当前集合中删除 TextDecorations 的一个集合并返回得到的(新)集合。Removes a collection of TextDecorations from the current collection and returns the resultant (new) collection.

public:
 bool TryRemove(System::Collections::Generic::IEnumerable<System::Windows::TextDecoration ^> ^ textDecorations, [Runtime::InteropServices::Out] System::Windows::TextDecorationCollection ^ % result);
public bool TryRemove (System.Collections.Generic.IEnumerable<System.Windows.TextDecoration> textDecorations, out System.Windows.TextDecorationCollection result);
member this.TryRemove : seq<System.Windows.TextDecoration> * TextDecorationCollection -> bool
Public Function TryRemove (textDecorations As IEnumerable(Of TextDecoration), ByRef result As TextDecorationCollection) As Boolean

参数

textDecorations
IEnumerable<TextDecoration>

要删除的集合The collection to be removed

result
TextDecorationCollection TextDecorationCollection TextDecorationCollection TextDecorationCollection

包含结果的 Out 参数。Out parameter containing the result. 如果未从当前集合中删除任何元素,则 result 是与原始集合相等的新集合。If no element was removed from the current collection, then result is a new collection identical to the original one.

返回

如果从当前集合中删除了至少一个项,则为 true;否则为 falsetrue if at least one item was removed from the current collection; otherwise, false.

注解

当前集合保持不变。The current collection remains unchanged. 如果要移除的集合不是当前集合的子集,则不删除任何元素。If the collection to be removed is not a subset of the current collection, then no element is removed. 如果源集合有一个项的多个实例,则该项的所有实例都将被移除。If the source collection has multiple instances of an item, then all instances of the item are removed.

适用于