VB.NET Tutorial - Dynamic Arrays (Visual Basic .NET)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024
  • In this VB.NET tutorial, I'll show you the basics of using Dynamic Arrays with ReDim. We'll also learn about the ReDim Preserve option to preserve the array contents when we restructure it.
    Note: Small mistake - The PopulateArray Sub loops the entire array and overwrites the preserved contents. Sorry!
    Tutorial Features:
    Dynamic Arrays - 1-D and 2-D Arrays
    Form Controls - Button, Label, ListBox
    Random - Generate Random Numbers
    Subs - Populate Our Array with Random Numbers
    Lambda Expression - Loop through array and populate ListBox

ความคิดเห็น • 8

  • @geniushomwetv9793
    @geniushomwetv9793 5 ปีที่แล้ว

    It works thank you

  • @ralphmalone8337
    @ralphmalone8337 5 ปีที่แล้ว

    After the Sub runs does the Array remain in memory ? I am toying with reading a csv into an array, reading it back out to pad the line to prep it for loading into a database.. Not sure the best way to proceed.. maybe I should just make an ETL process within the database..

  • @TELong1603
    @TELong1603 4 ปีที่แล้ว

    I am programming beginner. I am writing a Bible Trivia game in visual basic The data is in a delimited text file that is attached to the solution explorer. How can I get VB to read the file so that I can load the data into an array?
    Thanks,
    Thomas Long

  • @samueljloms6744
    @samueljloms6744 8 ปีที่แล้ว

    hello please how do we accept user inputs into a two dimensional array and display the inputs from the array into a list box
    PLEASE HELP...

  • @wookienutsack9284
    @wookienutsack9284 10 ปีที่แล้ว

    i need help
    at DymArray(i) = rnd.Next(1, 101), i always get the message "Object reference not set to an instance of an object." after I run it.
    what should i do?

    • @VBToolbox
      @VBToolbox  10 ปีที่แล้ว +1

      Hiya, Wookie! Did you create *rnd* as a "New" Random?

    • @wookienutsack9284
      @wookienutsack9284 10 ปีที่แล้ว

      oh lemme check

  • @baherwahby22
    @baherwahby22 ปีที่แล้ว

    Plesse answer my question