Difference Between Dim i() As Integer and Dim i as Integer() RRS feed

  • Question

  • User2023521679 posted

    I see two different ways of declaring arrays in vb.net: Dim i() As Integer and Dim i as Integer(). What is the difference between these two?

    Tuesday, June 9, 2015 3:33 PM


  • User397347636 posted

    Absolutely no difference.

    For fixed-size arrays, you can only use the first form: e.g., Dim i(5) As Integer

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 9, 2015 6:09 PM