Solved

New question about VB.NET

Posted on 2003-11-24
1
147 Views
Last Modified: 2010-05-03
How can I sorting and searching information from a textfile use array?

For instance,    sort names by A.B.C.D...Z
 
                       search person's information by their firstname,lastname and major code  etc.

I don't know to use array,it seems a little complex for me, and I don't understand what textbook showed me.


Waiting for help

regards,  


Ge

 
0
Comment
Question by:gegou
1 Comment
 
LVL 42

Accepted Solution

by:
frodoman earned 125 total points
ID: 9814115
The easiest way to think of an array as a list.  A list has 1 or more items that you can look at individually.

Item#1 = Apple
Item#2 = Orange
Item#3 = Grape

Any time you want you can check to see what Item#3 is ("grape").  You don't have to read the entire list, you can just count down 3 items and see what it says.

So in an array this could be:

Food(1) = "Apple"
Food(2) = "Orange"
Food(3) = "Grape"


So if you want to check what the 3rd item in the array/list is, you'd just do something like: writeline Food(3)

Then later if you say IF Food(2) < Food(3) THEN Something what you're asking is if the 2nd item in the list is less than the 3rd item in the list.  If the items are numbers, it's as simple as that.  If the items are text (like this example) then "less than" means alphabetically less (e.g.: A is less than B, B is less than C, etc.)

I'm not going to do your homework for you, but hopefully this answer helps you understand what an array is so you can grasp from here.

Good luck!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now