System Library Common Framework
Search Results for

    *.Benchmark*,*.Tests*,*.ApiTests*,*.BaseTest*,DelegateJsonConverter,CalleeCancelledRequestException,ClientResponse,ContentType,OutputCachePolicy
    Show / Hide Table of Contents Show / Hide Table of Contents
    NamespaceSystemLibrary.Common.Framework.Extensions SystemLibrary.Common.Framework.Net.dll

    This class contains extension methods for Arrays

    ArrayExtensions

    public static class ArrayExtensions

    Inheritance
    object
    ArrayExtensions
    Examples
    Arguments
    X

    Methods

    Add one array with another, resulting in a new array

    - Pass a predicate method to filter out values

    public static T[] Add<T>(this T[] current, Func<T, bool> predicate, params T[][] additional)

    X
    var arr = new int [] { 3,4 };
    var arr2 = new int [] { 1,2,3 };
    var arr3 = arr.Add((i) => i > 1, arr2);
    // arr3 now contains { 2,3,3,4 }, in that order, note the duplicated values
    X
    Generic types
    Name Description
    T
    Methods arguments
    Type Name Description
    T[] current
    Func<T, bool> predicate
    T[][] additional
    X
    Type Description
    T[]

    Returns null if everything is null, else a new array of items

    Add one array with another, resulting in a new array

    public static T[] Add<T>(this T[] current, params T[][] additional)

    X
    var arr = new int [] { 2 };
    var arr2 = new int [] { 1 };
    var arr3 = arr.Add(arr2);
    // arr3 now contains { 2, 1 }, in that order
    X
    Generic types
    Name Description
    T
    Methods arguments
    Type Name Description
    T[] current
    T[][] additional
    X
    Type Description
    T[]

    Returns null or a new array

    }

    In This Article
    Package: nuget
    Source: github
    Website: System Library Common Framework