.


:




:

































 

 

 

 


Int Compare(object , object )




, ; , ; , , , .

IComparer<T> System. Collections. Generic. Compare (), .

Int Compare( , )

, , , , , , , . IComparer<T> , . , , .

.

21.11. , Array

 

 

 

public bool IsFixedSize { get; }

public bool IsReadOnly { get; }

public bool

IsSynchronized { get; }

 

. true, , false,

. true, Array , false. true . true, , false. true

 

 

'

 

public int Length {

 

. int

 

get; }

 

 

Public long LongLength

 

. long

 

{ get; }

 

 

public int Rank { get; }

 

.

 

Public object SyncRoot

 

. ,

 

{ get; }

 

 

21.12. , Array

 

 

 

Public static

 

 

ReadOnlyCollection<T>

 

, ,

 

AsReadOnly<T>( [] array)

 

array

 

Public static int

 

value

 

BinarySearch(Array

 

array,

 

array.

 

object value)

 

. , . array

 

Public static int

 

value

 

BinarySearch<T>(T[]

 

array,

 

array.

 

T value)

 

. , . array

 

Public static int

 

value

 

BinarySearch(Array

 

array,

 

, array,

 

object value, IComparer

 

,

 

comparer)

 

comparer. . , . array

 

Public static int

 

value

 

BinarySearch<T> (T [ ]

 

array,

 

array, ,

 

T value, IComparer<T>

 

comparer.

 

comparer)

 

. , . array

 

Public static int

 

value

 

BinarySearch(Array

 

array,

 

array. ,

 

int index, int length,

 

index,

 

object value)

 

, length. . , . array

 

 

 

public static int

 

value

 

BinarySearch<T>(T[] array,

 

array. ,

 

int index, int length, T

 

index,

 

value)

 

, length. . , . array

 

public static int

 

value

 

BinarySearch(Array array,

 

array, ,

 

int index, int length,

 

comparer.

 

object value, IComparer

 

, index,

 

comparer)

 

, length. . , . array

 

public static int

 

value

 

BinarySearch<T>(T [] array,

 

array, ,

 

int index, int length,

 

comparer.

 

T value, Icomparer<T>

 

, index,

 

comparer)

 

, length. . , . array

 

public static void

 

array

 

Clear(Array array, int

 

, null

 

index, int length)

 

false : , . , , , index, , length

 

public object Clone ()

 

. , , ". , , , ,

 

public static void

 

,

 

ConstrainedCopy(Array

 

length,

 

sourceArray, int sourcelndex,

 

sourceArray, ,

 

Array destinationArray, int

 

sourcelndex,

 

destinationlndex, int length)

 

destinationArray, ,

 

_ . 21.12

 

 

 

destinationlndex.

 

, ConstrainedCopy () ", . , destinationAr ray

 

public static TTo [ ]

 

array Tlnput

 

Convert11<Input,

 

TOutput

 

TTo>(TFrom[] array,

 

. .

 

Converter<TOutput, TTo>

 

,

 

converter)

 

converter

 

public static void

 

,

 

Copy(Array sourceArray,

 

length, sourceArray

 

Array destinationArray,

 

int

 

destinationArray,

 

length)

 

. , () ", . , destinationArray

 

public static void

 

,

 

Copy(Array sourceArray,

 

length, sourceArray

 

Array destinationArray,

 

long

 

destinationArray,

 

length)

 

. , () , . , destinationArray

 

public static void

 

,

 

Copy(Array sourceArray,

 

length, sourceArray,

 

int sourcelndex, Array

 

,

 

destinationArray, int

 

sourceArray [ sourcelndex],

 

destinationlndex, int

 

destinationArray, ,

 

length)

 

destinationAr ray [destinationlndex]. , () , . , destinationArray

 

 

 

public static void

 

,

 

Copy(Array sourceArray,

 

length, sourceArray,

 

long sourcelndex, Array

 

,

 

destinationArray, long

 

sourceArray [source Index],

 

destinationlndex, long

 

destinationArray, ,

 

length)

 

destinationArray [destinationlndex]. , () , . , destinationArray

 

public void CopyTo(Array

 

 

array, int index)

 

array, , array [index]. , array

 

public void CopyTo(Array

 

 

array, long index)

 

array, , array [index]. , array

 

public static Array

 

,

 

Createlnstance(Type

 

elementType,

 

elementType, int length)

 

length

 

public static Array

 

 

Createlnstance(Type

 

lengthl*length2.

 

elementType, int lengthl,

 

elementType

 

int length2)

 

public static Array

 

^

 

Createlnstance(Type

 

lengthl* length2* length3.

 

elementType, int lengthl,

 

elementType

 

int length2, int length3)

 

public static Array

 

,

 

Createlnstance(Type

 

lengths.

 

elementType, params int[]

 

 

lengths)

 

elementType

 

public static Array

 

,

 

Createlnstance(Type

 

lengths.

 

elementType, params long[]

 

 

lengths)

 

elementType

 

_ . 21.12

 

 

 

Public static Array

 

,

 

Createlnstance(Type

 

lengths.

 

elementType, int []lengths,

 

 

int[] lowerBounds)

 

elementType. lowerBounds. , , ,

 

Public static bool

 

true,

 

Exists<T>(T[] array,

 

array ,

 

Predicate<T> match)

 

, match, false

 

public static T Find<T>(T[]

 

array,

 

array , Predicate<T> match)

 

, match, default ()

 

public static T[]

 

array,

 

FindAll<T>(T[] array,

 

,

 

Predicate<T> match)

 

match,

 

Public static int

 

 

FindIndex<T>(T[] array,

 

array, ,

 

Predicate<T> match)

 

match, -1

 

Public static int

 

 

FindIndex<T>(T[] array, int

 

array,

 

startlndex, Predicate<T>

 

, match.

 

match)

 

, array [ start Index]. , , , -1

 

Public static int

 

 

FindIndex<T>(T[] array,

 

array,

 

int startlndex, int count,

 

, match.

 

Predicate<T> match)

 

, array [startlndex], , count. , , , -1

 

Public static T

 

array,

 

FindLast<T>(T[] array,

 

,

 

Predicate<T> match)

 

match, default ()

 

 

 

Public static int

 

 

FindLastIndex<T>(T []

 

array,

 

array, ,

 

. Predicate<T> match )

 

match, -1

 

Public static int

 

 

FindLastIndex<T>(T []

 

array,

 

array, ,

 

int startlndex, Predicate<T>

 

match.

 

match)

 

, array [startlndex], array [ 0]. , , , -1

 

Public static int

 

 

FindLastIndex<T>(T []

 

array,

 

array, ,

 

int startlndex , int

 

count,

 

v.

 

Predicate<T> match)

 

, array[start], , count. , , , -1

 

Public static void

 

,

 

ForEach<T>(T[] array,

 

action, array

 

Action<T> action)

 

Public IEnumerator

 

 

GetEnumerator ()

 

. . 25

 

Public override int

 

-

 

GetHashCode ()

 

Public int GetLength(int

 

.

 

dimension)

 

, 0 dimension, 1 ..

 





:


: 2016-12-03; !; : 430 |


:

:

- , - .
==> ...

1472 - | 1396 -


© 2015-2024 lektsii.org - -

: 0.274 .