Algorithms..::..Replace<(Of <(<'T>)>)> Method (IEnumerable<(Of <(<'T>)>)>, T, T)
Replace all items in a collection equal to a particular value with another values, yielding another collection.
Namespace:
Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
public static IEnumerable<T> Replace<T>( IEnumerable<T> collection, T itemFind, T replaceWith )
Public Shared Function Replace(Of T) ( _ collection As IEnumerable(Of T), _ itemFind As T, _ replaceWith As T _ ) As IEnumerable(Of T)
public: generic<typename T> static IEnumerable<T>^ Replace( IEnumerable<T>^ collection, T itemFind, T replaceWith )
Type Parameters
- T
Parameters
- collection
- Type: IEnumerable<(Of <(<'T>)>)>
The collection to process.
- itemFind
- Type: T
The value to find and replace within collection.
- replaceWith
- Type: T
The new value to replace with.