Show / Hide Table of Contents

    Class EnumerableExtensions

    Extension methods for the System.Collections.Generic.IEnumerable<T> interface.

    Inheritance
    System.Object
    EnumerableExtensions
    Namespace: Cuemon.Collections.Generic
    Assembly: Cuemon.Core.dll
    Syntax
    public static class EnumerableExtensions

    Methods

    | Improve this Doc

    Shuffle<T>(IEnumerable<T>)

    Shuffles the specified source like a deck of cards.

    Declaration
    public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> source)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The elements to be shuffled in the randomization process.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    A sequence of T with the shuffled source.

    Type Parameters
    Name Description
    T
    Remarks

    Fisher–Yates shuffle: https://en.wikipedia.org/wiki/Fisher–Yates_shuffle

    | Improve this Doc

    Shuffle<T>(IEnumerable<T>, Func<Int32, Int32, Int32>)

    Shuffles the specified source like a deck of cards.

    Declaration
    public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> source, Func<int, int, int> randomizer)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The elements to be shuffled in the randomization process.

    System.Func<System.Int32, System.Int32, System.Int32> randomizer

    The function delegate that will handle the randomization of source.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    A sequence of T with the shuffled source.

    Type Parameters
    Name Description
    T
    Remarks

    Fisher–Yates shuffle: https://en.wikipedia.org/wiki/Fisher–Yates_shuffle

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX