MathLib Docs MathLib Docs
MathLib Docs MathLib Docs

Search Results for

    Edit this page

    Class EnumerableExtensions

    Provides extension methods for IEnumerable<T>.

    Inheritance
    object
    EnumerableExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: MathLib
    Assembly: MathLib.dll
    Syntax
    public static class EnumerableExtensions

    Methods

    | Edit this page View Source

    Str<T>(IEnumerable<T>, string, int)

    Joins the elements of the enumerable into a string, separated by the specified delimiter. Each element is left-padded to meet a specified total width.

    Declaration
    public static string Str<T>(this IEnumerable<T> source, string delimiter = "", int totalWidth = 0) where T : notnull
    Parameters
    Type Name Description
    IEnumerable<T> source

    The enumerable to join.

    string delimiter

    The delimiter to insert between each element. Defaults to an empty string.

    int totalWidth

    The total width of each element in the joined string. Defaults to 0 (no padding).

    Returns
    Type Description
    string

    A string with the joined elements, padded to the specified total width.

    Type Parameters
    Name Description
    T

    The type of the elements in the enumerable. Must not be null.

    | Edit this page View Source

    Sum(IEnumerable<BigInteger>)

    Sum of all elements in the specified source.

    Declaration
    public static BigInteger Sum(this IEnumerable<BigInteger> source)
    Parameters
    Type Name Description
    IEnumerable<BigInteger> source

    Collection of BigInteger elements.

    Returns
    Type Description
    BigInteger

    Total sum as BigInteger.