Re: How to pass a 2-D array into a function?
- From: Gman <nah>
- Date: Mon, 14 Nov 2005 23:34:28 -0600
Excellent - it will come as no surprise to learn that I have quite a few sort routines in my bag of tricks too.... I look forward to seeing the back of them!
Michael C wrote:
"Gman" <nah> wrote in message news:%23L1xFMa6FHA.1420@xxxxxxxxxxxxxxxxxxxxxxx
Cool! I'm only on chapter 8 of my new .NET book (arrays don't make an appearance until chap 11) so that's very good news. I can throw away some of my bag of tricks.
Sorting is quite cool, you call Array.Sort and pass in an instance of a class that has a function called Comparer. The sort then calls your function and you return -1, 0 or 1 depending on if the elements are lessthan, equal or greater than each other. So you can do a very efficient bug free sort in a few lines of code.
Michael
.
- References:
- Re: How to pass a 2-D array into a function?
- From: Gman
- Re: How to pass a 2-D array into a function?
- From: Michael C
- Re: How to pass a 2-D array into a function?
- From: Dmitriy Antonov
- Re: How to pass a 2-D array into a function?
- From: Michael C
- Re: How to pass a 2-D array into a function?
- From: Gman
- Re: How to pass a 2-D array into a function?
- From: Michael C
- Re: How to pass a 2-D array into a function?
- From: Gman
- Re: How to pass a 2-D array into a function?
- From: Michael C
- Re: How to pass a 2-D array into a function?
- Prev by Date: Re: How to pass a 2-D array into a function?
- Next by Date: Re: How to pass a 2-D array into a function?
- Previous by thread: Re: How to pass a 2-D array into a function?
- Next by thread: Re: How to pass a 2-D array into a function?
- Index(es):
Relevant Pages
|