There are different ways that you can create array , here I am going to explain them for you
1.You can supply the array size when you are declaring it , as the following example shows.
[VB.NET]
Dim cargoWeights(10) As Double Dim atmospherePressures(2, 2, 4, 10) As Short Dim inquiriesByYearMonthDay(20)()() As Byte
[C#]
double[] cargoWeights = new double[11]; short[,,,] atmospherePressures = new short[3, 3, 5, 11]; byte[][][] inquiriesByYearMonthDay = new byte[21][][]; 2.You can also use a New clause to supply the size of an array when it’s created, as the following example shows.
[VB.NET]
cargoWeights = New Double(10) {} atmospherePressures = New Short(2, 2, 4, 10) {} inquiriesByYearMonthDay = New Byte(20)()() {}
[C#]
cargoWeights = new double[11]; atmospherePressures = new short[3, 3, 5, 11]; inquiriesByYearMonthDay = new byte[21][][];
I really like it when folks get together and share opinions.
Great website, keep it up!
Its not my first time to visit this website, i am visiting this site dailly and take fastidious facts
from here everyday.