troubleshooting Question

Using Data Structures as I would an array

Avatar of CRX4LIFE18
CRX4LIFE18 asked on
Visual Basic ClassicVisual Basic.NET
5 Comments1 Solution506 ViewsLast Modified:
     I have written a .dll and have been using arrays for a project I've been working on for a while now, though I've recently discovered how to create my own data structure. I like that fact that I can have a description of sorts as opposed to having a huge list of numbers/text, but I need to be able to loop through the datastructure to get all of the informatoin out without having to designate each item as my current setup my arrays are very large and this would take a lot of time. My goal is to be able to somehow get these into an indexable array if possible to throw them in a loop to dump all data as below:

Public Structure Test
     Public WidgetName as String
     Public WidgetColor as String
     Public WidgetWeight as Integer
End Structure

Test.WidgetName = Widget1
Test.WidgetColor = Green
Test.WidgetWeight = 15

Dim Counter1 as Integer = -1
Dim DataString as String
     Counter1 = Counter1 + 1
     DataString = DataString & "," & Test(Counter1)
Loop until Counter1 = DataString.Length - 1

Is there any way to do this? Any help would be greatly appreciated!
Jeff Certain

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros