Demonstrate a two-dimensional array : Array Dimension : Collections Data Structure C# Source Code


Custom Search

C# Source Code » Collections Data Structure » Array Dimension »

 

Demonstrate a two-dimensional array









    

// Demonstrate a two-dimensional array.  
using System; 

public class TwoD {  
  public static void Main() {  
    int t, i; 
    int[,] table = new int[3, 4];  
  
    for( t = 0; t < 3; ++t) {  
      for(i = 0; i < 4; ++i) {  
        table[t,i] = (t*4)+i+1;  
        Console.Write(table[t,i] + " ");  
      }  
      Console.WriteLine(); 
    }  
  } 
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Collections Data Structure
» Array Dimension