Click or drag to resize

ExtensionMethodsSplitPairsTValue1, TValue2, TValue3, TValue4 Method

Splits the pairs in the enumerable into two lists of values where the pair at position x in source equals to values1[x], values2[x]

Namespace:  SD.Tools.Algorithmia.GeneralDataStructures
Assembly:  SD.Tools.Algorithmia (in SD.Tools.Algorithmia.dll) Version: 1.3.3.0 (1.3.18.0209)
Syntax
public static void SplitPairs<TValue1, TValue2, TValue3, TValue4>(
	this IEnumerable<Pair<TValue1, TValue2>> source,
	List<TValue3> values1,
	List<TValue4> values2
)
where TValue3 : TValue1
where TValue4 : TValue2

Parameters

source
Type: System.Collections.GenericIEnumerablePairTValue1, TValue2
The source.
values1
Type: System.Collections.GenericListTValue3
The list of all Value1 values in the pairs in source.
values2
Type: System.Collections.GenericListTValue4
The list of all Value2 values in the pairs in source.

Type Parameters

TValue1
The type of the Value1 property.
TValue2
The type of the Value2 property.
TValue3
The type of the elements in values1. TValue1 has to be casteable to TValue3.
TValue4
The type of the eleemnts in values2. TValue2 has to be casteable to TValue4.

Usage Note

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