1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Arrays

Discussion in 'C#' started by StormForum, Nov 29, 2007.

  1. #1
    Hello - me again!

    Okay... I am learning ASP.NET from a book and just want to make sure I'm on the right tracks.

    So imagine I created an array like: Dim intArray() As Integer = {{1,2}, {2,3}} and I used a variable: Dim intArrayA As Integer
    intArrayA = intArray(0,1) which would mean that intArrayA has the value 2? And it would be the same kind of deal if I did this instead: intArrayA(1,1) which would have the value 3?

    Okay. If that is the case if I made a new array like: Dim newArray(1,2) would it be newArray(1, 2) = {{1, 2}, {1, 2, 3}}

    I'd appreciate any help on this :).
    SEMrush
    Cheers.
     
    StormForum, Nov 29, 2007 IP
    SEMrush
  2. Wizard

    Wizard Member

    Messages:
    80
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    No, you are just declaring a two-dimension array which contains no value yet.

    Nope, same as above about the two-dimension array

    This statement will give you a two-dimensional array with 25 elements
    Dim intArray(4, 4) As Integer

    This statement will create an array with three values, with indexes 0 to 2
    Dim intArray() As Integer = {1, 2, 3}
     
    Wizard, Nov 30, 2007 IP