Results 1 to 2 of 2

Thread: query regarding C#

  1. #1
    Priscila king is offline Member
    Join Date
    Jun 2009
    Posts
    46
    Rep Power
    0

    Default query regarding C#

    So i have raised the question regarding C# as I am learning to develop application using C# and I am confused about jagged Arrays, what are they. I think I will get proper answer of the same. So help me. Any help may be appreciated. Thank you!

  2. #2
    david harlow is offline Member
    Join Date
    Jun 2009
    Posts
    52
    Rep Power
    4

    Default

    A particular kind of array is introduced in C#. A Jagged Array is an array of an array in which the distance of both array indexes can be deferent.

    Example: A Jagged Array can be used is to make a table in which the lengths of the rows are deferent. This Array is stated with square brackets 甜 ] 鍍o specify each aspect. The subsequent code demonstrates the creation of a two-dimensional jagged array

    Code:
    Class Jagged 
    {
    public static void Main() {int [][] jagged=new int [3][]; jagged[0]=mew int[4]
    Jagged [1]=mew int[3]
    Jagged [2]=mew int[5]
    int I;
    全toring values in first array
    For (I=0; I<4; I++)
    Jagged [0][I]=I;
    全toring values in second array
    for( I=0;I<3;I++)
    jagged[1][I]=I;
    全toring values in third array
    for(I=0;I<5;I++)
    jagged[2][I]=I;
    船isplaying values from first array
    for (I=0;I<4;I++)
    Console.WriteLine(jagged[0][I])
    船isplaying values from second array
    for (I=0;I<3;I++) Console. Write Line (jagged[1][I]) 船isplaying values from third array
    for(I=0;I<5;I++)
    Console. Write Line (jagged[2][I])
    }
    }

Similar Threads

  1. Video card query
    By Sandy Patrick in forum Video Card
    Replies: 4
    Last Post: 11-04-2010, 03:05 PM
  2. CPU RMA OC query
    By WilsonMartin in forum other peripherals
    Replies: 3
    Last Post: 08-06-2010, 05:47 PM
  3. Overclocking query
    By HowardAllen in forum Overclocking
    Replies: 4
    Last Post: 08-06-2010, 03:21 PM
  4. query not working
    By TaylorRyan in forum Operating System
    Replies: 1
    Last Post: 02-18-2010, 01:22 PM
  5. query dependent on another query
    By Davisricky in forum Programming
    Replies: 2
    Last Post: 02-02-2010, 05:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48