IGroupingExtensionsJoinByFirstGroupElementT, TKey(IEnumerableIGroupingTKey, T) Method
Takes the first element of each group and joins them into a new IEnumerableT.
Namespace: DevCase.Extensions.IGroupingExtensionsAssembly: 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<T> JoinByFirstGroupElement<T, TKey>(
this IEnumerable<IGrouping<TKey, T>> sender
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function JoinByFirstGroupElement(Of T, TKey) (
sender As IEnumerable(Of IGrouping(Of TKey, T))
) As IEnumerable(Of T)
Dim sender As IEnumerable(Of IGrouping(Of TKey, T))
Dim returnValue As IEnumerable(Of T)
returnValue = sender.JoinByFirstGroupElement()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T, typename TKey>
static IEnumerable<T>^ JoinByFirstGroupElement(
IEnumerable<IGrouping<TKey, T>^>^ sender
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member JoinByFirstGroupElement :
sender : IEnumerable<IGrouping<'TKey, 'T>> -> IEnumerable<'T>
No code example is currently available or this language may not be supported.
- sender IEnumerableIGroupingTKey, T
-
The source collection.
- T
-
The type of the source elements.
- TKey
-
The type of the source IGroupingTKey, TElement key.
IEnumerableT
The resulting
IEnumerableT.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableIGroupingTKey,
T. 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 collection As IEnumerable(Of String) = {"1", "1", "22", "3", "333", "333"}
Dim groups As IEnumerable(Of IGrouping(Of Integer, String)) = collection.GroupBy(Function(str As String) str.Length)
Dim newCollection As IEnumerable(Of String) = groups.JoinByFirstGroupElement()
For Each element As String In newCollection
Console.WriteLine(element)
Next
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.