By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

Sorting an array

P: n/a
Hello all,

I am trying to help a fellow working with a VB6.NET project and am having
trouble.

The exercise wants us to read some words in English, German and French into
an array from a text file, which I got working fine.

But now it wants us to sort the array by the English words, and I would
assume the German and French equiviliant as well.

I have never sorted in VB6 and was wondering if anyone could tell me how to
accomplish this. If you could provide a sample it would be greatly
appreciated.

Thanks in advance for your help,
John
Nov 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
"John Conklin" <jo**********@cox.net> schrieb:
I am trying to help a fellow working with a VB6.NET project and am having
trouble.


VB6 or VB.NET?

For VB6, consider posting the question to one of the "microsoft.public.vb.*"
groups.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

P: n/a
> VB6 or VB.NET?

VB.NET

Thanks,
~John

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eX**************@TK2MSFTNGP14.phx.gbl...
"John Conklin" <jo**********@cox.net> schrieb:
I am trying to help a fellow working with a VB6.NET project and am having
trouble.


VB6 or VB.NET?

For VB6, consider posting the question to one of the
"microsoft.public.vb.*" groups.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

P: n/a
Check out this page: http://www.vb-helper.com/tut1.htm

I'd suggest the selection sort. It is the shortest and easiest to use of the
ones presented.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John Conklin" <jo**********@cox.net> wrote in message
news:eN**************@tk2msftngp13.phx.gbl...
Hello all,

I am trying to help a fellow working with a VB6.NET project and am having
trouble.

The exercise wants us to read some words in English, German and French into an array from a text file, which I got working fine.

But now it wants us to sort the array by the English words, and I would
assume the German and French equiviliant as well.

I have never sorted in VB6 and was wondering if anyone could tell me how to accomplish this. If you could provide a sample it would be greatly
appreciated.

Thanks in advance for your help,
John

Nov 21 '05 #4

P: n/a
"John Conklin" <jo**********@cox.net> schrieb:
VB6 or VB.NET?


VB.NET


Take a look at 'Array.Sort'. If you want to use a custom sorting criteria,
take a look here:

CompareOperator
<URL:http://dotnet.mvps.org/dotnet/samples/codingtechnique/CompareOperator.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #5

P: n/a

"John Conklin" <jo**********@cox.net> wrote
I am trying to help a fellow working with a VB6.NET project and am having
trouble. But now it wants us to sort the array by the English words, and I would
assume the German and French equiviliant as well.

I have never sorted in VB6 and was wondering if anyone could tell me how to
accomplish this. If you could provide a sample it would be greatly
appreciated.

See if this will help you get started....
http://groups-beta.google.com/group/...5187401917dcf8

LFS
Nov 21 '05 #6

P: n/a

Ive noticed that google groups is super duper slow, taking about a day to
get replies, so if you post now, dont expect to see your post until
tomorrow, or for that matter, anyones answers to your post.

I just setup my wonderful Outlook Express news thing to the group specified
below, and answers appear instantly.

The array index, isnt the VB6 started at "1" and in the C languages it
starts with "0"?

So Id guess the VB.net also indexes arrays from the 0th operator? To
maintain compatability?

See if this will help you get started....
http://groups-beta.google.com/group/...5187401917dcf8
LFS

Nov 21 '05 #7

P: n/a
"Bradley1234" <so*****@yahoo.com> schrieb:
The array index, isnt the VB6 started at "1" and in the C languages it
starts with "0"?
In VB you could use an arbitrary start index.
So Id guess the VB.net also indexes arrays from the 0th operator? To
maintain compatability?


In VB.NET, indices of arrays start with 0. That's mainly for
interoperability (between different .NET programming languages) reasons, at
least according to Microsoft.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.