[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

New question about VB.NET

Posted on 2003-11-24
1
Medium Priority
?
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 42

Accepted Solution

by:
frodoman earned 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

650 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