Monday, 7 May 2018

jagged Array in C#







using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;



namespace ConsoleApplication8

{

    class Program

    {

        static void Main(string[] args)

        {

            int [][]jagged=new int[3][];

            jagged[0]=new int[]{11,22,33,44,55,66};

            jagged[1] = new int[] { 12, 24, 36, 48 };

            jagged[2] = new int[] { 13, 26, 39 };





            for (int i = 0; i < jagged.Length ; i++)

            {



                for (int j = 0; j < jagged[i].Length; j++)

                {

                    Console.Write(jagged[i][j]+"\t");

                }

                Console.WriteLine();



            }

            Console.ReadLine();



        }

    }

}


No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...