A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://morelinq.github.io/3.0/ref/api/html/M_MoreLinq_Extensions_SegmentExtension_Segment__1_1.htm below:

SegmentExtensionSegmentT Method (IEnumerableT, FuncT, Int32, Boolean)

SegmentExtensionSegmentT Method (IEnumerableT, FuncT, Int32, Boolean)

Divides a sequence into multiple sequences by using a segment detector based on the original sequence

Namespace:  MoreLinq.Extensions
Assembly:

MoreLinq (in MoreLinq.dll) Version: 3.0.0

Syntax
public static IEnumerable<IEnumerable<T>> Segment<T>(
	this IEnumerable<T> source,
	Func<T, int, bool> newSegmentPredicate
)
<ExtensionAttribute>
Public Shared Function Segment(Of T) ( 
	source As IEnumerable(Of T),
	newSegmentPredicate As Func(Of T, Integer, Boolean)
) As IEnumerable(Of IEnumerable(Of T))
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<IEnumerable<T>^>^ Segment(
	IEnumerable<T>^ source, 
	Func<T, int, bool>^ newSegmentPredicate
)
[<ExtensionAttribute>]
static member Segment : 
        source : IEnumerable<'T> * 
        newSegmentPredicate : Func<'T, int, bool> -> IEnumerable<IEnumerable<'T>> 
Parameters
source
Type: System.Collections.GenericIEnumerableT
The sequence to segment
newSegmentPredicate
Type: SystemFuncT, Int32, Boolean
A function, which returns true if the given element or index indicate a new segment, and false otherwise
Type Parameters
T
The type of the elements in the sequence
Return Value

Type:

IEnumerableIEnumerableT

A sequence of segment, each of which is a portion of the original sequence

Usage Note

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)

.

Exceptions See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4