HashSet<T>.CopyTo Yöntem
Tanım
Bir koleksiyonun öğelerini bir HashSet<T> diziye kopyalar.Copies the elements of a HashSet<T> collection to an array.
Aşırı Yüklemeler
CopyTo(T[]) |
Bir nesnenin öğelerini bir HashSet<T> diziye kopyalar.Copies the elements of a HashSet<T> object to an array. |
CopyTo(T[], Int32) |
Bir HashSet<T> nesnenin öğelerini belirtilen dizi dizininden başlayarak bir diziye kopyalar.Copies the elements of a HashSet<T> object to an array, starting at the specified array index. |
CopyTo(T[], Int32, Int32) |
HashSet<T>Belirtilen dizi dizininden başlayarak bir nesnenin belirtilen sayıda öğesini bir diziye kopyalar.Copies the specified number of elements of a HashSet<T> object to an array, starting at the specified array index. |
CopyTo(T[])
Bir nesnenin öğelerini bir HashSet<T> diziye kopyalar.Copies the elements of a HashSet<T> object to an array.
public:
void CopyTo(cli::array <T> ^ array);
public void CopyTo (T[] array);
member this.CopyTo : 'T[] -> unit
Public Sub CopyTo (array As T())
Parametreler
- array
- T[]
Nesneden kopyalanmış öğelerin hedefi olan tek boyutlu dizi HashSet<T> .The one-dimensional array that is the destination of the elements copied from the HashSet<T> object. Dizinin sıfır tabanlı dizinlemeye sahip olması gerekir.The array must have zero-based indexing.
Özel durumlar
array
, null
değeridir.array
is null
.
Açıklamalar
Bu yöntem, olduğu bir O ( n
) işlemidir n
Count .This method is an O(n
) operation, where n
is Count.
Şunlara uygulanır
CopyTo(T[], Int32)
Bir HashSet<T> nesnenin öğelerini belirtilen dizi dizininden başlayarak bir diziye kopyalar.Copies the elements of a HashSet<T> object to an array, starting at the specified array index.
public:
virtual void CopyTo(cli::array <T> ^ array, int arrayIndex);
public void CopyTo (T[] array, int arrayIndex);
abstract member CopyTo : 'T[] * int -> unit
override this.CopyTo : 'T[] * int -> unit
Public Sub CopyTo (array As T(), arrayIndex As Integer)
Parametreler
- array
- T[]
Nesneden kopyalanmış öğelerin hedefi olan tek boyutlu dizi HashSet<T> .The one-dimensional array that is the destination of the elements copied from the HashSet<T> object. Dizinin sıfır tabanlı dizinlemeye sahip olması gerekir.The array must have zero-based indexing.
- arrayIndex
- Int32
array
içinde kopyalamanın başladığı sıfır tabanlı dizin.The zero-based index in array
at which copying begins.
Uygulamalar
Özel durumlar
array
, null
değeridir.array
is null
.
arrayIndex
0 ' dan küçük.arrayIndex
is less than 0.
arrayIndex
, hedefin uzunluğundan daha büyük array
.arrayIndex
is greater than the length of the destination array
.
Açıklamalar
Bu yöntem, olduğu bir O ( n
) işlemidir n
Count .This method is an O(n
) operation, where n
is Count.
Şunlara uygulanır
CopyTo(T[], Int32, Int32)
HashSet<T>Belirtilen dizi dizininden başlayarak bir nesnenin belirtilen sayıda öğesini bir diziye kopyalar.Copies the specified number of elements of a HashSet<T> object to an array, starting at the specified array index.
public:
void CopyTo(cli::array <T> ^ array, int arrayIndex, int count);
public void CopyTo (T[] array, int arrayIndex, int count);
member this.CopyTo : 'T[] * int * int -> unit
Public Sub CopyTo (array As T(), arrayIndex As Integer, count As Integer)
Parametreler
- array
- T[]
Nesneden kopyalanmış öğelerin hedefi olan tek boyutlu dizi HashSet<T> .The one-dimensional array that is the destination of the elements copied from the HashSet<T> object. Dizinin sıfır tabanlı dizinlemeye sahip olması gerekir.The array must have zero-based indexing.
- arrayIndex
- Int32
array
içinde kopyalamanın başladığı sıfır tabanlı dizin.The zero-based index in array
at which copying begins.
- count
- Int32
Kopyalanacak öğe sayısı array
.The number of elements to copy to array
.
Özel durumlar
array
, null
değeridir.array
is null
.
arrayIndex
0 ' dan küçük.arrayIndex
is less than 0.
-veya--or-
count
0 ' dan küçük.count
is less than 0.
arrayIndex
, hedefin uzunluğundan daha büyük array
.arrayIndex
is greater than the length of the destination array
.
-veya--or-
count
, hedefin sonuna kadar olan kullanılabilir alandan daha büyük index
array
.count
is greater than the available space from the index
to the end of the destination array
.
Açıklamalar
Bu yöntem, olduğu bir O ( n
) işlemidir n
count
.This method is an O(n
) operation, where n
is count
.