Return Rectangular Float Array - CSharp System

CSharp examples for System:Array Dimension

Description

Return Rectangular Float Array

Demo Code



public class Main{
        internal static float[][] ReturnRectangularFloatArray(int Size1, int Size2)
        {//from w  ww  .j av  a  2s .  c  o  m
            float[][] Array;
            if (Size1 > -1)
            {
                Array = new float[Size1][];
                if (Size2 > -1)
                {
                    for (int Array1 = 0; Array1 < Size1; Array1++)
                    {
                        Array[Array1] = new float[Size2];
                    }
                }
            }
            else
                Array = null;

            return Array;
        }
}

Related Tutorials