Exemple #1
0
        static public IEnumerable <T> Where <T>(this T[, , ] array, Func <T, int, int, int, bool> predicate)
        {
            List <T> newArray = new List <T>();

            array.ForEach((element, i, j, k) => {
                if (predicate(element, i, j, k))
                {
                    newArray.Add(element);
                }
            });
            return(newArray);
        }
Exemple #2
0
 static public void ForEach <T>(this T[, , ] array, Action action)
 {
     array.ForEach((_, i, j, k) => action());
 }
Exemple #3
0
 static public void ForEach <T>(this T[, , ] array, Action <T> action)
 {
     array.ForEach((element, i, j, k) => action(element));
 }