Pchp.Library.Arrays.shuffle C# (CSharp) Method

shuffle() public static method

Randomizes the order of elements in the array using PhpMath random numbers generator.
Reindexes all keys in the resulting array.
Thrown if the argument is null.
public static shuffle ( PhpArray array ) : bool
array Pchp.Core.PhpArray
return bool
        public static bool shuffle(PhpArray array)
        {
            if (array == null)
            {
                //PhpException.ArgumentNull("array");
                //return false;
                throw new ArgumentNullException();
            }

            array.Shuffle(PhpMath.Generator);
            array.ReindexAll();

            return true;
        }