語言

TextDecorationCollection.TryRemove 方法

定義

從目前集合中移除 的 TextDecorations 集合,並返回結果(新的)集合。

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

備註

現有收藏保持不變。 若要移除的集合不是目前集合的子集,則不移除任何元素。 如果來源集合有多個項目實例,則該項目的所有實例都會被移除。

適用於