Re: How to pass a 2-D array into a function?
- From: "Michael C" <mculley@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 15 Nov 2005 16:29:01 +1100
"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
.
- Follow-Ups:
- Re: How to pass a 2-D array into a function?
- From: Gman
- Re: How to pass a 2-D array into a function?
- 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?
- Prev by Date: Re: VB Source code in 98 vs. XP
- 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):