语言

TextDecorationCollection.TryRemove 方法

定义

从当前集合中移除集合 TextDecorations 并返回结果 (new) 集合。

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>

要删除的集合。

result
TextDecorationCollection

包含结果的 Out 参数。 如果未从当前集合中删除任何元素,则 result 新集合与原始集合相同。

返回

true 如果从当前集合中删除了至少一个项,则为 ;否则,为 false.

注解

当前集合保持不变。 如果要删除的集合不是当前集合的子集,则不会删除任何元素。 如果源集合具有项的多个实例,则会删除该项的所有实例。

适用于