IEnumerableExtensionsSplitIntoNumberOfElementsT(IEnumerableT, Int32) Method
Splits the source IEnumerableT into secuences with the specified amount of elements.
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>> SplitIntoNumberOfElements<T>(
this IEnumerable<T> sender,
int amount
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function SplitIntoNumberOfElements(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.SplitIntoNumberOfElements(amount)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static IEnumerable<IEnumerable<T>^>^ SplitIntoNumberOfElements(
IEnumerable<T>^ sender,
int amount
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member SplitIntoNumberOfElements :
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 elements.
- 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}
Dim splittedCols As IEnumerable(Of IEnumerable(Of Integer)) = mainCol.SplitIntoNumberOfElements(amount:=4)
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.