Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > New to Arrays


Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2004, 07:45 PM
equis equis is offline
Regular
 
Join Date: Nov 2002
Posts: 89
Default New to Arrays


Hello,

I have been learning about arrays from some online tutorials, I have some questions if someone can help

If I have an array with names, address' & phone numbers in it, how do I search the array for the Name and then get that address & phone number?

Also can you do a wildcard search on an array? (Fred% for example)

I was also told you can give your array columns names by using the const word, is this true? how would that work?

Thanks Heaps

Reply With Quote
  #2  
Old 01-14-2004, 07:58 PM
Optikal's Avatar
Optikal Optikal is offline
Codeaholic

Retired Leader
* Guru *
 
Join Date: Oct 2002
Location: Winnipeg, MB, Canada
Posts: 4,543
Default

uhhh, arrays don't have columns. You can create a multi-dimension array if thats what your talking about, but there are no dimension/column names.

To search an array you have to loop through it. If you want to do a wildcard search you would have to loop through the array and perform whatever type of compare you wished on each array item.

If you wanted to store name/address/phone in an array, you could create a user-defined type or a class, and create an array of those.
__________________
There are 10 types of people in this world, those that understand binary, and those that don't.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creation of arrays dynamically to store data aNTi General 4 10-20-2003 08:16 AM
Clearing out arrays kcary General 1 04-14-2003 03:40 AM
access info within array(s) jobrandes General 11 12-02-2002 10:16 AM
Question about arrays vstat General 2 01-20-2002 11:21 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->