src/Shared/EntityFramework/Core/Common/Utils/Helpers.cs
// <summary>
// Returns a new array with the first element equal to <paramref name="arg" /> and the remaining
// elements taken from <paramref name="args" />.
// </summary>
// <typeparam name="TElement"> The element type of the arrays </typeparam>
// <param name="args"> An array that provides the successive elements of the new array </param>
// <param name="arg"> An instance the provides the first element of the new array </param>
// <returns> A new array containing the specified argument as the first element and the specified successive elements </returns>
Returns a new array with the first element equal to  and the remaining
elements taken from .
Returns a new array with the first element equal to and the remaining elements taken from .
internal static TElement[] Prepend<TElement>(TElement[] args, TElement arg)
        {
            DebugCheck.NotNull(args);
            var retVal = new TElement[args.Length + 1];
            retVal[0] = arg;
            for (var idx = 0; idx < args.Length; idx++)
            {
                retVal[idx + 1] = args[idx];
            }
            return retVal;
        }
internal static TElement [ ] Prepend < TElement > ( TElement [ ] args , TElement arg ) { DebugCheck . NotNull ( args ) ; var retVal = new TElement [ args . Length + 1 ] ; retVal [ 0 ] = arg ; for ( var idx = 0 ; idx < args . Length ; idx ++ ) { retVal [ idx + 1 ] = args [ idx ] ; } return retVal ; }
Returns a new array with the first element equal to  and the remaining
elements taken from .
Returns a new array with the first element equal to and the remaining elements taken from .
A new array containing the specified argument as the first element and the specified successive elements
A new array containing the specified argument as the first element and the specified successive elements
args
TElement[]
An array that provides the successive elements of the new array
An array that provides the successive elements of the new array
arg
TElement
An instance the provides the first element of the new array
An instance the provides the first element of the new array
typeparam
The element type of the arrays
The element type of the arrays