Version

ExtractExistingElement(ArrayList,Type,Boolean,Object) Method

Static method that searches thru the passed in collection and returns the first object of the requested type that it finds
Syntax
'Declaration
 
Protected Overloads Shared Function ExtractExistingElement( _
   ByVal existingElements As ArrayList, _
   ByVal type As Type, _
   ByVal removeExtractedElement As Boolean, _
   ByVal context As Object _
) As Object
protected static object ExtractExistingElement( 
   ArrayList existingElements,
   Type type,
   bool removeExtractedElement,
   object context
)

Parameters

existingElements
Collection to search
type
Type of element to locate
removeExtractedElement
True to remove the element from the arraylist. The size of the arraylist will remain constant.
context
Context that the element should contain or null if the context should not be considered.

Return Value

The first object of the requested type that is found int he passed in collection.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also