Пример #1
0
 public static void ArrayReverse(Array arr)
 {
     if (((arr != null) ? arr.Length : 0) != 0)
     {
         BloxUtil.ArrayReverseRes(arr).CopyTo(arr, 0);
     }
 }
Пример #2
0
        protected override object RunBlock()
        {
            object obj   = base.contextBlock.Run();
            Array  array = obj as Array;

            if (array != null)
            {
                if (array.Length > 0)
                {
                    if (base.owningBlock == null)
                    {
                        BloxUtil.ArrayReverse(array);
                        return(null);
                    }
                    return(BloxUtil.ArrayReverseRes(array));
                }
                if (base.owningBlock != null)
                {
                    return(array);
                }
            }
            else
            {
                base.LogError("The context must be an Array but was [" + ((obj != null) ? obj.GetType() : null) + "]", null);
            }
            return(null);
        }