Click or drag to resize

collectionExtensionsgetAllOfTypeT Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Gets the first instance of type in supplied collection. makeNewIfNotFound

Namespace:  imbSCI.Core.extensions.data
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static List<T> getAllOfType<T>(
	this IEnumerable source,
	bool makeNewIfNotFound = false
)
Request Example View Source

Parameters

source
Type: System.CollectionsIEnumerable
The source collection to search in
makeNewIfNotFound (Optional)
Type: SystemBoolean

Type Parameters

T

Return Value

Type: ListT
Instance of type

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable. 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).
See Also