IEnumerableExtensionsSplitIntoPartsT Method
Splits the source IEnumerableT into the specified amount of secuences.
Namespace: DevCase.Extensions.IEnumerableExtensionsAssembly: 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 IEnumerable<IEnumerable<T>> SplitIntoParts<T>(
this IEnumerable<T> sender,
int amount
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function SplitIntoParts(Of T) (
sender As IEnumerable(Of T),
amount As Integer
) As IEnumerable(Of IEnumerable(Of T))
Dim sender As IEnumerable(Of T)
Dim amount As Integer
Dim returnValue As IEnumerable(Of IEnumerable(Of T))
returnValue = sender.SplitIntoParts(amount)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static IEnumerable<IEnumerable<T>^>^ SplitIntoParts(
IEnumerable<T>^ sender,
int amount
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member SplitIntoParts :
sender : IEnumerable<'T> *
amount : int -> IEnumerable<IEnumerable<'T>>
No code example is currently available or this language may not be supported.
- sender IEnumerableT
-
The source collection.
- amount Int32
-
The target amount of secuences.
- T
-
The type.
IEnumerableIEnumerableTIEnumerableT.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. 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.
Dim mainCol As IEnumerable(Of Integer) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}
Dim splittedCols As IEnumerable(Of IEnumerable(Of Integer)) = mainCol.SplitIntoParts(amount:=2)
splittedCols.ToList.ForEach(Sub(col As IEnumerable(Of Integer))
Debug.WriteLine(String.Join(", ", col))
End Sub)
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.