Search Results for

    Show / Hide Table of Contents

    Class ArrayHelpers

    Class containing useful methods for manipulating arrays.

    Inheritance
    object
    ArrayHelpers
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Evergine.Common.Graphics
    Assembly: Evergine.Common.dll
    Syntax
    public static class ArrayHelpers

    Methods

    CopyArray<T>(T[])

    Array copy.

    Declaration
    public static T[] CopyArray<T>(this T[] src)
    Parameters
    Type Name Description
    T[] src

    The source array.

    Returns
    Type Description
    T[]

    The cloned array.

    Type Parameters
    Name Description
    T

    The array type.

    EnsureArraySize<T>(ref T[], int)

    Ensure that the array length is equal that the specified size. If it's not, resize the array size to the specified capacity.

    Declaration
    public static void EnsureArraySize<T>(ref T[] array, int size)
    Parameters
    Type Name Description
    T[] array

    The array.

    int size

    The capacity.

    Type Parameters
    Name Description
    T

    The array type.

    EnsureCapacityPo2<T>(ref T[], int)

    Ensure that the array has the specified capacity. If it's not, resize the capacity to the next power of two value that contains the specified capacity.

    Declaration
    public static void EnsureCapacityPo2<T>(ref T[] array, int capacity)
    Parameters
    Type Name Description
    T[] array

    The array.

    int capacity

    The capacity.

    Type Parameters
    Name Description
    T

    The array type.

    EnsureCapacity<T>(ref T[], int)

    Ensure that the array has the specified capacity. If it's not, resize the array size to the specified capacity.

    Declaration
    public static void EnsureCapacity<T>(ref T[] array, int capacity)
    Parameters
    Type Name Description
    T[] array

    The array.

    int capacity

    The capacity.

    Type Parameters
    Name Description
    T

    The array type.

    In This Article
    Back to top
    Generated by DocFX