PCinvent.info

PCinvent Studio Template

Sep 28 2008
C# Mutliple Dimension Syntax Print E-mail
Sunday, 28 September 2008


Read More Articles in: Technology>>>Programming

This Article is written by This e-mail address is being protected from spam bots, you need JavaScript enabled to view it


To be not confused with the mutliple dimension between C++ and C#, here I put my few lines of note as reference.
When we declar multiple dimensions array in C++, we do:
int myArrray[5][5]={}
but in C#, we do the declaration with
int[,] myArray;
myArray = new int [5,5];
Hence, if we need more than two dimension, we declare it with more semi-colon sepration, for example 5 dimesnion:
int[,,,,] myArray;
myArray = new int [5,5,5,5,5];
myArray[0,0,0,0,0] = 1;
myArray[3,4,3,3,3] = 7;
Comments (0)Add Comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley

busy
Tags:  Technology Programming C# Multiple Dimension C++ Difference between C++ and C#
Last Updated ( Monday, 29 September 2008 )
 
< Prev   Next >
Full Color Printing from PsPrint
Site by PCinvent.com