<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'dynamic arrays in vb.net ?????' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'dynamic arrays in vb.net ?????' posted on the 'VB.NET' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Thu, 09 Feb 2012 07:23:34 -0800</pubDate>
    <lastBuildDate>Thu, 09 Feb 2012 07:23:34 -0800</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>dynamic arrays in vb.net ?????</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409334/409334/dynamic-arrays-in-vbnet-/</link>
      <description>im trying to declare an array with an unknown length and no way of figuring it out untill the actual data has been placed within the array, in c++ it possible to fill a dynamic array with data and then find out the length if u need 2, but in vb.net im not sure, i know abt the redim concept, but does it work in this case...&lt;br /&gt;
&lt;br /&gt;
thank u sooo much !!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409334/409334/dynamic-arrays-in-vbnet-/</guid>
      <pubDate>Sun, 15 Nov 2009 19:40:07 -0800</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: dynamic arrays in vb.net ?????</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409334/409372/re-dynamic-arrays-in-vbnet-/#409372</link>
      <description>You a few options to solve the scenario you are facing.&lt;br /&gt;
&lt;br /&gt;
Firstly, and more directly to your questions, you can declare the size of an array dynamically like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
'Say I am getting data from the database, and i don't know how
'many rows I am getting...

'At somepoint, I will get a count for the amount of data coming back, and when I get that 'count' i can declare the array like so:

Dim RowCount as Integer = 15

Dim DynamArray(RowCount) As Integer
'Now DynamArray's bounds are 0 - 14

'You can also declare an array with no size:
Dim DynamArray() as Integer

'Then change the length afterwards:
ReDim DynamArray(RowCount)

'And Finally, if you want to add an item to the array:
ReDim Preserve DynamArray(DynamArray.Length)
DynamArray(DynamArray.Length - 1) = Value
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Since you understand how to do this enough to have done it in C++, I won't bore you with details... Here is another way to do it, look into using an arrayList, it dynamically holds multiple datatypes&lt;br /&gt;
&lt;br /&gt;
Dim aList As New ArrayList&lt;br /&gt;
aList.Add(Object)&lt;br /&gt;
aList.Count&lt;br /&gt;
aList.Item(0)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409334/409372/re-dynamic-arrays-in-vbnet-/#409372</guid>
      <pubDate>Mon, 16 Nov 2009 06:53:14 -0800</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: dynamic arrays in vb.net ?????</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409334/409394/re-dynamic-arrays-in-vbnet-/#409394</link>
      <description>thank u for the info, really helped, im still new to vb.net so im kinda learning as i go, thanx again!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409334/409394/re-dynamic-arrays-in-vbnet-/#409394</guid>
      <pubDate>Mon, 16 Nov 2009 13:46:01 -0800</pubDate>
      <category>VB.NET</category>
    </item>
  </channel>
</rss>
