ListBoxExtensionsRemoveItemsT Method
Removes items of the specified Type in the source ListBox given a condition.
Namespace: DevCase.Extensions.ListBoxExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static void RemoveItems<T>(
this ListBox sender,
Func<T, bool> predicate
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Sub RemoveItems(Of T) (
sender As ListBox,
predicate As Func(Of T, Boolean)
)
Dim sender As ListBox
Dim predicate As Func(Of T, Boolean)
sender.RemoveItems(predicate)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static void RemoveItems(
ListBox^ sender,
Func<T, bool>^ predicate
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member RemoveItems :
sender : ListBox *
predicate : Func<'T, bool> -> unit
No code example is currently available or this language may not be supported.
- sender ListBox
-
The source ListBox.
- predicate FuncT, Boolean
-
A FuncT, TResult function to test each element for a condition.
- T
-
The Type of items to remove.
In Visual Basic and C#, you can call this method as an instance method on any object of type
ListBox. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
ListBox1.Items.AddRange({Color.Red, Color.Green, Color.Blue})
Dim predicate As Func(Of Color, Boolean) =
Function(c As Color) As Boolean
Select Case c
Case Color.Green
Return True
Case Else
Return False
End Select
End Function
ListBox1.RemoveItems(Of Color)(predicate)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.