(TK[ ]
k
,
TV[ ]
v
)
Sor ts a pair of one-dimensional arrays into ascending order. The
k
array
contains the sor t keys. The
v
array contains the values linked to those keys.
Thus, the two arrays contain key/value pairs. After the sor t, both arrays are
in ascending-key order.
public static void Sor t(Array
k
, Array
v
,
IComparer
comp
)
Sor ts a pair of one-dimensional arrays into ascending order using the
comparison method specified by
comp.
The
k
array contains the sor t keys.
The
v
array contains the values linked to those keys. Thus, the two arrays
contain key/value pairs. After the sor t, both arrays are in ascending-key
order.
public static void
Sor t(TK[ ]
k
, TV[ ]
v
,
IComparer
comp
)
Sor ts a pair of one-dimensional arrays into ascending order using the
comparison method specified by
comp.
The
k
array contains the sor t keys.
The
v
array contains the values linked to those keys. Thus, the two arrays
contain key/value pairs. After the sor t, both arrays are in ascending-key
order.
public static void Sor t(Array
a
, int
star t
,
int
count
)
Sor ts a range of
a
into ascending order. The range begins at
a
[
star t
] and
runs for
count
elements. The array must be one-dimensional.
public static void Sor t(T[ ]
a
, int
star t
,
int
count
)
Sor ts a range of
a
into ascending order. The range begins at
a
[
star t
] and
runs for
count
elements. The array must be one-dimensional.
public static void Sor t(Array
a
, int
star t
,
int
count
,
IComparer
comp
)
Sor ts a range of
a
into ascending order using the comparison method
specified by
comp.
The range begins at
a
[
star t
] and runs for
count
elements.
The array must be one-dimensional.
public static void Sor t(T[ ]
a
, int
star t
,
int
count
,
IComparer
comp
)
Sor ts a range of
a
into ascending order using the comparison method
specified by
comp.
The range begins at
a
[
star t
] and runs for
count
elements.
The array must be one-dimensional.
public static void Sor t(Array
k
, Array
v
,
int
star t
, int
count
)
Sor ts a range within a pair of one-dimensional arrays into ascending order.
Within both arrays, the range to sor t begins at the index passed in
star t
and runs for
count
elements. The
k
array contains the sor t keys. The
v
array
contains the values linked to those keys. Thus, the two arrays contain key/
value pairs. After the sor t, both ranges are in ascending-key order.
public static void
Sor t(TK[ ]
k
, TK[ ]
v
,
int
star t
, int
count
)
Sor ts a range within a pair of one-dimensional arrays into ascending order.
Within both arrays, the range to sor t begins at the index passed in
star t
and runs for
count
elements. The
k
array contains the sor t keys. The
v
array
contains the values linked to those keys. Thus, the two arrays contain key/
value pairs. After the sor t, both ranges are in ascending-key order.
public static void Sor t(Array
k
, Array
v
,
int
star t
, int
count
,
IComparer
comp
)
Sor ts a range within a pair of one-dimensional arrays into ascending order
using the comparison method specified by
comp.
Within both arrays,
the range to sor t begins at the index passed in
star t
and runs for
count
elements. The
k
array contains the sor t keys. The
v
array contains the values
linked to those keys. Thus, the two arrays contain key/value pairs. After the
sor t, both ranges are in ascending-key order.
public static void
Sor t(TK[ ]
k
, TV
v
,
int
star t
, int
count
,
IComparer
comp
)
Sor ts a range within a pair of one-dimensional arrays into ascending order
using the comparison method specified by
comp.
Within both arrays,
the range to sor t begins at the index passed in
star t
and runs for
count
elements. The
k
array contains the sor t keys. The
v
array contains the values
linked to those keys. Thus, the two arrays contain key/value pairs. After the
sor t, both ranges are in ascending-key order.
public static bool
TrueForAll(T[ ] a, Predicate
pred
)
Returns true if the predicate specified by
pred
is satisfied by all elements in
a.
If one or more elements fail to satisfy
pred,
then false is returned.
T
ABLE
21-12
Methods Defi ned by
Array
(continued)
Method
Meaning
www.freepdf-books.com
648
P a r t I I :
E x p l o r i n g t h e C # L i b r a r y
Do'stlaringiz bilan baham: