Array 클래스

정의

배열을 만들고, 조작하고, 검색하고, 정렬하는 메서드를 제공하므로 공용 언어 런타임의 모든 배열에 대한 기본 클래스 역할을 합니다.

public ref class Array abstract : System::Collections::IList, System::Collections::IStructuralComparable, System::Collections::IStructuralEquatable
public ref class Array abstract : ICloneable, System::Collections::IList, System::Collections::IStructuralComparable, System::Collections::IStructuralEquatable
public ref class Array abstract : ICloneable, System::Collections::IList
public abstract class Array : System.Collections.IList, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable
public abstract class Array : ICloneable, System.Collections.IList, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable
[System.Serializable]
public abstract class Array : ICloneable, System.Collections.IList
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class Array : ICloneable, System.Collections.IList
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class Array : ICloneable, System.Collections.IList, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable
type Array = class
    interface ICollection
    interface IEnumerable
    interface IList
    interface IStructuralComparable
    interface IStructuralEquatable
type Array = class
    interface ICollection
    interface IEnumerable
    interface IList
    interface IStructuralComparable
    interface IStructuralEquatable
    interface ICloneable
[<System.Serializable>]
type Array = class
    interface ICloneable
    interface IList
    interface ICollection
    interface IEnumerable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Array = class
    interface ICloneable
    interface IList
    interface ICollection
    interface IEnumerable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Array = class
    interface ICloneable
    interface IList
    interface ICollection
    interface IEnumerable
    interface IStructuralComparable
    interface IStructuralEquatable
type Array = class
    interface IList
    interface ICollection
    interface IEnumerable
    interface IStructuralComparable
    interface IStructuralEquatable
Public MustInherit Class Array
Implements IList, IStructuralComparable, IStructuralEquatable
Public MustInherit Class Array
Implements ICloneable, IList, IStructuralComparable, IStructuralEquatable
Public MustInherit Class Array
Implements ICloneable, IList
상속
Array
특성
구현

예제

다음 코드 예제에서는 형식 정수의 배열과 형식 배열 간에 요소를 복사하는 Object방법을 Array.Copy 보여 줍니다.

open System

let printValues myArr =
    for i in myArr do
        printf $"\t{i}"
    printfn ""

// Creates and initializes a new integer array and a new Object array.
let myIntArray = [| 1..5 |]
let myObjArray = [| 26..30 |]

// Prints the initial values of both arrays.
printfn "Initially,"
printf "integer array:"
printValues myIntArray
printfn "Object array: "
printValues myObjArray

// Copies the first two elements from the integer array to the Object array.
Array.Copy(myIntArray, myObjArray, 2)

// Prints the values of the modified arrays.
printfn "\nAfter copying the first two elements of the integer array to the Object array,"
printf "integer array:"
printValues myIntArray
printf"Object array: "
printValues myObjArray

// Copies the last two elements from the Object array to the integer array.
Array.Copy(myObjArray, myObjArray.GetUpperBound 0 - 1, myIntArray, myIntArray.GetUpperBound 0 - 1, 2)

// Prints the values of the modified arrays.
printfn $"\nAfter copying the last two elements of the Object array to the integer array,"
printf "integer array:"
printValues myIntArray
printf "Object array: "
printValues myObjArray


// This code produces the following output.
//     Initially,
//     integer array:  1       2       3       4       5
//     Object array:   26      27      28      29      30
//     
//     After copying the first two elements of the integer array to the Object array,
//     integer array:  1       2       3       4       5
//     Object array:   1       2       28      29      30
//     
//     After copying the last two elements of the Object array to the integer array,
//     integer array:  1       2       3       29      30
//     Object array:   1       2       28      29      30
using System;
public class SamplesArray
{

    public static void Main()
    {

        // Creates and initializes a new integer array and a new Object array.
        int[] myIntArray = new int[5] { 1, 2, 3, 4, 5 };
        Object[] myObjArray = new Object[5] { 26, 27, 28, 29, 30 };

        // Prints the initial values of both arrays.
        Console.WriteLine("Initially,");
        Console.Write("integer array:");
        PrintValues(myIntArray);
        Console.Write("Object array: ");
        PrintValues(myObjArray);

        // Copies the first two elements from the integer array to the Object array.
        System.Array.Copy(myIntArray, myObjArray, 2);

        // Prints the values of the modified arrays.
        Console.WriteLine("\nAfter copying the first two elements of the integer array to the Object array,");
        Console.Write("integer array:");
        PrintValues(myIntArray);
        Console.Write("Object array: ");
        PrintValues(myObjArray);

        // Copies the last two elements from the Object array to the integer array.
        System.Array.Copy(myObjArray, myObjArray.GetUpperBound(0) - 1, myIntArray, myIntArray.GetUpperBound(0) - 1, 2);

        // Prints the values of the modified arrays.
        Console.WriteLine("\nAfter copying the last two elements of the Object array to the integer array,");
        Console.Write("integer array:");
        PrintValues(myIntArray);
        Console.Write("Object array: ");
        PrintValues(myObjArray);
    }

    public static void PrintValues(Object[] myArr)
    {
        foreach (Object i in myArr)
        {
            Console.Write("\t{0}", i);
        }
        Console.WriteLine();
    }

    public static void PrintValues(int[] myArr)
    {
        foreach (int i in myArr)
        {
            Console.Write("\t{0}", i);
        }
        Console.WriteLine();
    }
}
/*
This code produces the following output.

Initially,
integer array:  1       2       3       4       5
Object array:   26      27      28      29      30

After copying the first two elements of the integer array to the Object array,
integer array:  1       2       3       4       5
Object array:   1       2       28      29      30

After copying the last two elements of the Object array to the integer array,
integer array:  1       2       3       29      30
Object array:   1       2       28      29      30
*/
Public Class SamplesArray

    Public Shared Sub Main()

        ' Creates and initializes a new integer array and a new Object array.
        Dim myIntArray() As Integer = {1, 2, 3, 4, 5}
        Dim myObjArray() As Object = {26, 27, 28, 29, 30}

        ' Prints the initial values of both arrays.
        Console.WriteLine("Initially:")
        Console.Write("integer array:")
        PrintValues(myIntArray)
        Console.Write("Object array: ")
        PrintValues(myObjArray)

        ' Copies the first two elements from the integer array to the Object array.
        System.Array.Copy(myIntArray, myObjArray, 2)

        ' Prints the values of the modified arrays.
        Console.WriteLine(ControlChars.NewLine + "After copying the first two" _
           + " elements of the integer array to the Object array:")
        Console.Write("integer array:")
        PrintValues(myIntArray)
        Console.Write("Object array: ")
        PrintValues(myObjArray)

        ' Copies the last two elements from the Object array to the integer array.
        System.Array.Copy(myObjArray, myObjArray.GetUpperBound(0) - 1, myIntArray,
           myIntArray.GetUpperBound(0) - 1, 2)

        ' Prints the values of the modified arrays.
        Console.WriteLine(ControlChars.NewLine + "After copying the last two" _
           + " elements of the Object array to the integer array:")
        Console.Write("integer array:")
        PrintValues(myIntArray)
        Console.Write("Object array: ")
        PrintValues(myObjArray)
    End Sub

    Public Overloads Shared Sub PrintValues(myArr() As Object)
        Dim i As Object
        For Each i In myArr
            Console.Write(ControlChars.Tab + "{0}", i)
        Next i
        Console.WriteLine()
    End Sub

    Public Overloads Shared Sub PrintValues(myArr() As Integer)
        Dim i As Integer
        For Each i In myArr
            Console.Write(ControlChars.Tab + "{0}", i)
        Next i
        Console.WriteLine()
    End Sub
End Class

' This code produces the following output.
' 
' Initially:
' integer array:  1       2       3       4       5
' Object array:   26      27      28      29      30
' 
' After copying the first two elements of the integer array to the Object array:
' integer array:  1       2       3       4       5
' Object array:   1       2       28      29      30
' 
' After copying the last two elements of the Object array to the integer array:
' integer array:  1       2       3       29      30
' Object array:   1       2       28      29      30

다음 코드 예제에서는 만들고 초기화 Array 하 고 해당 속성 및 해당 요소를 표시 합니다.

open System

let printValues (myArray: Array) =
    let mutable i = 0
    let cols = myArray.GetLength(myArray.Rank - 1)
    for item in myArray do
        if i < cols then
            i <- i + 1
        else
            printfn ""
            i <- 1;
        printf $"\t{item}"
    printfn ""

// Creates and initializes a new three-dimensional Array of type int.
let myArr = Array.CreateInstance(typeof<int>, 2, 3, 4)
for i = myArr.GetLowerBound 0 to myArr.GetUpperBound 0 do
    for j = myArr.GetLowerBound 1 to myArr.GetUpperBound 1 do
        for k = myArr.GetLowerBound 2 to myArr.GetUpperBound 2 do
            myArr.SetValue(i * 100 + j * 10 + k, i, j, k)

// Displays the properties of the Array.
printfn $"The Array has {myArr.Rank} dimension(s) and a total of {myArr.Length} elements."
printfn $"\tLength\tLower\tUpper"

for i = 0 to myArr.Rank - 1 do
    printf $"{i}:\t{myArr.GetLength i}"
    printfn $"\t{myArr.GetLowerBound i}\t{myArr.GetUpperBound i}"

// Displays the contents of the Array.
printfn "The Array contains the following values:"
printValues myArr

// This code produces the following output.
// The Array has 3 dimension(s) and a total of 24 elements.
//     Length    Lower    Upper
// 0:  2    0    1
// 1:  3    0    2
// 2:  4    0    3
//
// The Array contains the following values:
//    0      1      2      3
//    10     11     12     13
//    20     21     22     23
//    100    101    102    103
//    110    111    112    113
//    120    121    122    123
// Creates and initializes a new three-dimensional Array of type int.
Array myArr = Array.CreateInstance(typeof(int), 2, 3, 4);
for (int i = myArr.GetLowerBound(0); i <= myArr.GetUpperBound(0); i++)
{
    for (int j = myArr.GetLowerBound(1); j <= myArr.GetUpperBound(1); j++)
    {
        for (int k = myArr.GetLowerBound(2); k <= myArr.GetUpperBound(2); k++)
        {
            myArr.SetValue((i * 100) + (j * 10) + k, i, j, k);
        }
    }
}

// Displays the properties of the Array.
Console.WriteLine("The Array has {0} dimension(s) and a total of {1} elements.", myArr.Rank, myArr.Length);
Console.WriteLine("\tLength\tLower\tUpper");
for (int i = 0; i < myArr.Rank; i++)
{
    Console.Write("{0}:\t{1}", i, myArr.GetLength(i));
    Console.WriteLine("\t{0}\t{1}", myArr.GetLowerBound(i), myArr.GetUpperBound(i));
}

// Displays the contents of the Array.
Console.WriteLine("The Array contains the following values:");
PrintValues(myArr);

void PrintValues(Array myArray)
{
    System.Collections.IEnumerator myEnumerator = myArray.GetEnumerator();
    int i = 0;
    int cols = myArray.GetLength(myArray.Rank - 1);
    while (myEnumerator.MoveNext())
    {
        if (i < cols)
        {
            i++;
        }
        else
        {
            Console.WriteLine();
            i = 1;
        }
        Console.Write("\t{0}", myEnumerator.Current);
    }
    Console.WriteLine();
}
// This code produces the following output.

// The Array has 3 dimension(s) and a total of 24 elements.
//     Length    Lower    Upper
// 0:  2    0    1
// 1:  3    0    2
// 2:  4    0    3
//
// The Array contains the following values:
//    0      1      2      3
//    10     11     12     13
//    20     21     22     23
//    100    101    102    103
//    110    111    112    113
//    120    121    122    123
Public Class SamplesArray2

    Public Shared Sub Main()

        ' Creates and initializes a new three-dimensional Array of
        ' type Int32.
        Dim myArr As Array = Array.CreateInstance(GetType(Int32), 2, 3, 4)
        Dim i As Integer
        For i = myArr.GetLowerBound(0) To myArr.GetUpperBound(0)
            Dim j As Integer
            For j = myArr.GetLowerBound(1) To myArr.GetUpperBound(1)
                Dim k As Integer
                For k = myArr.GetLowerBound(2) To myArr.GetUpperBound(2)
                    myArr.SetValue(i * 100 + j * 10 + k, i, j, k)
                Next k
            Next j
        Next i ' Displays the properties of the Array.
        Console.WriteLine("The Array has {0} dimension(s) and a " _
           + "total of {1} elements.", myArr.Rank, myArr.Length)
        Console.WriteLine(ControlChars.Tab + "Length" + ControlChars.Tab _
           + "Lower" + ControlChars.Tab + "Upper")
        For i = 0 To myArr.Rank - 1
            Console.Write("{0}:" + ControlChars.Tab + "{1}", i,
               myArr.GetLength(i))
            Console.WriteLine(ControlChars.Tab + "{0}" + ControlChars.Tab _
               + "{1}", myArr.GetLowerBound(i), myArr.GetUpperBound(i))
        Next i

        ' Displays the contents of the Array.
        Console.WriteLine("The Array contains the following values:")
        PrintValues(myArr)
    End Sub

    Public Shared Sub PrintValues(myArr As Array)
        Dim myEnumerator As System.Collections.IEnumerator =
           myArr.GetEnumerator()
        Dim i As Integer = 0
        Dim cols As Integer = myArr.GetLength(myArr.Rank - 1)
        While myEnumerator.MoveNext()
            If i < cols Then
                i += 1
            Else
                Console.WriteLine()
                i = 1
            End If
            Console.Write(ControlChars.Tab + "{0}", myEnumerator.Current)
        End While
        Console.WriteLine()
    End Sub
End Class

' This code produces the following output.
' 
' The Array has 3 dimension(s) and a total of 24 elements.
'     Length    Lower    Upper
' 0:    2    0    1
' 1:    3    0    2
' 2:    4    0    3
' The Array contains the following values:
'     0    1    2    3
'     10    11    12    13
'     20    21    22    23
'     100    101    102    103
'     110    111    112    113
'     120    121    122    123

설명

Array 클래스는 네임스페이 System.Collections 스의 일부가 아닙니다. 그러나 인터페이스를 기반으로 하므로 여전히 컬렉션으로 IList 간주됩니다.

Array 클래스는 배열을 지원하는 언어 구현의 기본 클래스입니다. 그러나 시스템 및 컴파일러만 클래스에서 명시적으로 파생할 Array 수 있습니다. 사용자는 언어에서 제공하는 배열 구문을 사용해야 합니다.

요소는 .의 값입니다 Array. 길이는 포함할 Array 수 있는 요소의 총 수입니다. 하한 Array 은 첫 번째 요소의 인덱스입니다. 하 Array 한은 있을 수 있지만 기본적으로 하한은 0입니다. 를 사용하여 CreateInstance클래스의 인스턴스를 만들 때 다른 하한을 Array 정의할 수 있습니다. 다차원은 Array 각 차원에 대해 서로 다른 범위를 가질 수 있습니다. 배열에는 최대 32개의 차원이 있을 수 있습니다.

네임스페이스의 클래스와 System.CollectionsArray 달리 고정 용량이 있습니다. 용량을 늘리려면 필요한 용량으로 새 Array 개체를 만들고, 이전 Array 개체의 요소를 새 개체로 복사하고, 이전 Array개체를 삭제해야 합니다.

배열 크기는 총 40억 개의 요소로 제한되며 지정된 차원의 최대 0X7FEFFFFF 인덱스로 제한됩니다(바이트 배열 및 싱글 바이트 구조의 배열에 대한 0X7FFFFFC7).

.NET Framework only: 기본적으로 Array 최대 크기는 2GB입니다. 64비트 환경에서는 gcAllowVeryLargeObjects 구성 요소의 특성을 런타임 환경에서 설정 enabled 하여 크기 제한을 방지할 true 수 있습니다.

1차원 배열은 , System.Collections.Generic.ICollection<T>System.Collections.Generic.IEnumerable<T>System.Collections.Generic.IReadOnlyList<T>System.Collections.Generic.IReadOnlyCollection<T> 제네릭 인터페이스를 구현System.Collections.Generic.IList<T>합니다. 구현은 런타임에 배열에 제공되며, 따라서 제네릭 인터페이스는 클래스의 선언 구문 Array 에 나타나지 않습니다. 또한 배열을 제네릭 인터페이스 형식(명시적 인터페이스 구현)으로 캐스팅하는 경우에만 액세스할 수 있는 인터페이스 멤버에 대한 참조 항목이 없습니다. 이러한 인터페이스 중 하나에 배열을 캐스팅할 때 알아야 할 중요한 사항은 요소를 추가, 삽입 또는 제거하는 멤버가 throw NotSupportedException된다는 것입니다.

Type 개체는 배열 형식 선언에 대한 정보를 제공합니다. Array 배열 형식이 같은 개체는 동일한 Type 개체를 공유합니다.

Type.IsArray Type.GetElementType 배열이 형식Array으로 Array 캐스팅되는 경우 결과가 배열이 아닌 개체이므로 예상 결과를 반환하지 않을 수 있습니다. 즉, typeof(System.Array).IsArray 반환 false하고 typeof(System.Array).GetElementType 반환합니다 null.

메서드는 Array.Copy 동일한 형식의 배열 간뿐만 아니라 다른 형식의 표준 배열 간에도 요소를 복사합니다. 형식 캐스팅을 자동으로 처리합니다.

SetValueGetValueCopyToCopy같은 CreateInstance일부 메서드는 64비트 정수를 대용량 배열을 수용하기 위한 매개 변수로 허용하는 오버로드를 제공합니다. LongLength 배열 GetLongLength 의 길이를 나타내는 64비트 정수로 반환합니다.

Array 정렬이 보장되지 않습니다. 정렬해야 하는 작업(예: BinarySearch)을 Array 수행하기 전에 정렬 Array 해야 합니다.

네이 Array 티브 코드에서 포인터 개체를 사용하는 것은 지원되지 않으며 여러 메서드에 NotSupportedException 대해 throw됩니다.

속성

Name Description
IsFixedSize

고정 크기가 있는지 여부를 Array 나타내는 값을 가져옵니다.

IsReadOnly

Array 읽기 전용인지 여부를 나타내는 값을 가져옵니다.

IsSynchronized

Array 대한 액세스가 동기화되는지 여부를 나타내는 값을 가져옵니다(스레드로부터 안전).

Length

의 모든 차원에 있는 요소의 Array총 수를 가져옵니다.

LongLength

모든 차원의 총 요소 수를 나타내는 64비트 정수를 가져옵니다 Array.

MaxLength

배열에 포함될 수 있는 최대 요소 수를 가져옵니다.

Rank

의 순위(차원 수)를 Array가져옵니다. 예를 들어 1차원 배열은 1을 반환하고 2차원 배열은 2를 반환합니다.

SyncRoot

Array대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.

메서드

Name Description
AsReadOnly<T>(T[])

지정된 배열에 대한 읽기 전용 래퍼를 반환합니다.

BinarySearch(Array, Int32, Int32, Object, IComparer)

지정된 IComparer 인터페이스를 사용하여 1차원 정렬 배열의 요소 범위에서 값을 검색합니다.

BinarySearch(Array, Int32, Int32, Object)

배열의 각 요소와 지정된 값에 의해 구현된 인터페이스를 사용하여 IComparable 1차원 정렬 배열의 요소 범위를 검색하여 값을 검색합니다.

BinarySearch(Array, Object, IComparer)

지정된 IComparer 인터페이스를 사용하여 전체 1차원 정렬 배열에서 값을 검색합니다.

BinarySearch(Array, Object)

배열의 각 요소와 지정된 개체에 의해 구현된 인터페이스를 사용하여 IComparable 전체 1차원 정렬 배열에서 특정 요소를 검색합니다.

BinarySearch<T>(T[], Int32, Int32, T, IComparer<T>)

지정된 IComparer<T> 제네릭 인터페이스를 사용하여 1차원 정렬 배열의 요소 범위에서 값을 검색합니다.

BinarySearch<T>(T[], Int32, Int32, T)

1차원 정렬 배열의 요소 범위에서 지정된 값으로 구현된 제 Array 네릭 인터페이스를 사용하여 IComparable<T> 값을 검색합니다.

BinarySearch<T>(T[], T, IComparer<T>)

지정된 IComparer<T> 제네릭 인터페이스를 사용하여 전체 1차원 정렬 배열에서 값을 검색합니다.

BinarySearch<T>(T[], T)

지정된 개체의 각 요소에 의해 구현된 제네릭 인터페이스를 사용하여 IComparable<T> 전체 1차원 정렬 배열에서 특정 요소를 Array 검색합니다.

Clear(Array, Int32, Int32)

배열의 요소 범위를 각 요소 형식의 기본값으로 설정합니다.

Clear(Array)

배열의 내용을 지웁니다.

Clone()

의 단순 복사본을 Array만듭니다.

ConstrainedCopy(Array, Int32, Array, Int32, Int32)

지정된 소스 인덱스에서 시작부터 시작하여 지정된 대상 인덱스에서 시작하는 다른 Array 요소 Array 에 붙여넣습니다. 복사본이 완전히 성공하지 못하면 모든 변경 내용이 취소되도록 보장합니다.

ConvertAll<TInput,TOutput>(TInput[], Converter<TInput,TOutput>)

한 형식의 배열을 다른 형식의 배열로 변환합니다.

Copy(Array, Array, Int32)

첫 번째 요소에서 Array 시작하는 요소의 범위를 복사하여 첫 번째 요소에서 시작하는 다른 Array 요소에 붙여넣습니다. 길이는 32비트 정수로 지정됩니다.

Copy(Array, Array, Int64)

첫 번째 요소에서 Array 시작하는 요소의 범위를 복사하여 첫 번째 요소에서 시작하는 다른 Array 요소에 붙여넣습니다. 길이는 64비트 정수로 지정됩니다.

Copy(Array, Int32, Array, Int32, Int32)

지정된 소스 인덱스에서 시작부터 시작하여 지정된 대상 인덱스에서 시작하는 다른 Array 요소 Array 에 붙여넣습니다. 길이와 인덱스는 32비트 정수로 지정됩니다.

Copy(Array, Int64, Array, Int64, Int64)

지정된 소스 인덱스에서 시작부터 시작하여 지정된 대상 인덱스에서 시작하는 다른 Array 요소 Array 에 붙여넣습니다. 길이와 인덱스는 64비트 정수로 지정됩니다.

CopyTo(Array, Int32)

현재 1차원 배열의 모든 요소를 지정된 대상 배열 인덱스에서 시작하는 지정된 1차원 배열에 복사합니다. 인덱스는 32비트 정수로 지정됩니다.

CopyTo(Array, Int64)

현재 1차원 배열의 모든 요소를 지정된 대상 배열 인덱스에서 시작하는 지정된 1차원 배열에 복사합니다. 인덱스는 64비트 정수로 지정됩니다.

CreateInstance(Type, Int32, Int32, Int32)

0부터 시작하는 인덱싱을 사용하여 지정된 Type 길이와 차원 길이의 3차원 Array 을 만듭니다.

CreateInstance(Type, Int32, Int32)

0부터 시작하는 인덱싱을 사용하여 지정된 Type 길이와 차원 길이의 2차원 Array 을 만듭니다.

CreateInstance(Type, Int32)

0부터 시작하는 인덱싱을 사용하여 지정된 Type 길이와 길이의 1차원 Array 을 만듭니다.

CreateInstance(Type, Int32[], Int32[])

지정된 하한을 사용하여 지정된 Type 차원 길이와 차원 길이의 다차원 Array 을 만듭니다.

CreateInstance(Type, Int32[])

0부터 시작하는 인덱싱을 사용하여 Array 지정된 Type 차원 길이와 차원 길이의 다차원을 만듭니다. 차원 길이는 32비트 정수 배열로 지정됩니다.

CreateInstance(Type, Int64[])

0부터 시작하는 인덱싱을 사용하여 Array 지정된 Type 차원 길이와 차원 길이의 다차원을 만듭니다. 차원 길이는 64비트 정수 배열로 지정됩니다.

CreateInstanceFromArrayType(Type, Int32)

0부터 시작하는 인덱싱을 사용하여 지정된 배열 형식 및 길이의 1차원 Array 을 만듭니다.

CreateInstanceFromArrayType(Type, Int32[], Int32[])

지정된 하한을 사용하여 지정된 Type 차원 길이와 차원 길이의 다차원 Array 을 만듭니다.

CreateInstanceFromArrayType(Type, Int32[])

0부터 시작하는 인덱싱을 사용하여 Array 지정된 Type 차원 길이와 차원 길이의 다차원을 만듭니다.

Empty<T>()

빈 배열을 반환합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
Exists<T>(T[], Predicate<T>)

지정된 배열에 지정된 조건자로 정의된 조건과 일치하는 요소가 포함되어 있는지 여부를 확인합니다.

Fill<T>(T[], T, Int32, Int32)

지정된 value 형식 T 을 (포함) 범위 startIndex 내에 있는 지정된 array 요소와 다음 count 인덱스 수에 할당합니다.

Fill<T>(T[], T)

지정된 형식의 각 요소에 지정된 value 형식 T 을 할당합니다 array.

Find<T>(T[], Predicate<T>)

지정된 조건자에서 정의한 조건과 일치하는 요소를 검색하고 전체 Array조건자 내에서 첫 번째 항목을 반환합니다.

FindAll<T>(T[], Predicate<T>)

지정된 조건자가 정의한 조건과 일치하는 모든 요소를 검색합니다.

FindIndex<T>(T[], Int32, Int32, Predicate<T>)

지정된 조건자에서 정의한 조건과 일치하는 요소를 검색하고 지정된 인덱스에서 시작하여 지정된 개수의 요소를 포함하는 요소 Array 범위 내에서 첫 번째 항목의 인덱스(0부터 시작)를 반환합니다.

FindIndex<T>(T[], Int32, Predicate<T>)

지정된 조건자에서 정의한 조건과 일치하는 요소를 검색하고, 지정된 인덱스에서 마지막 요소로 확장되는 요소 Array 범위 내에서 첫 번째 항목의 인덱스(0부터 시작)를 반환합니다.

FindIndex<T>(T[], Predicate<T>)

지정된 조건자에서 정의한 조건과 일치하는 요소를 검색하고 전체 Array내에서 처음 발생하는 0부터 시작하는 인덱스(0부터 시작)를 반환합니다.

FindLast<T>(T[], Predicate<T>)

지정된 조건자에서 정의한 조건과 일치하는 요소를 검색하고 전체 Array내에서 마지막으로 발생한 항목을 반환합니다.

FindLastIndex<T>(T[], Int32, Int32, Predicate<T>)

지정된 조건자에서 정의한 조건과 일치하는 요소를 검색하고 지정된 개수의 요소를 포함하고 지정된 인덱스에서 끝나는 요소 Array 범위 내에서 마지막으로 발생한 항목의 인덱스(0부터 시작하는 인덱스)를 반환합니다.

FindLastIndex<T>(T[], Int32, Predicate<T>)

지정된 조건자가 정의한 조건과 일치하는 요소를 검색하고 첫 번째 요소에서 지정된 인덱스로 확장되는 요소 Array 범위 내에서 마지막으로 발생한 항목의 인덱스(0부터 시작)를 반환합니다.

FindLastIndex<T>(T[], Predicate<T>)

지정된 조건자에서 정의한 조건과 일치하는 요소를 검색하고 전체 Array내에서 마지막으로 발생한 항목의 인덱스(0부터 시작하는 인덱스)를 반환합니다.

ForEach<T>(T[], Action<T>)

지정된 배열의 각 요소에 대해 지정된 작업을 수행합니다.

GetEnumerator()

에 대한 값을 IEnumerator 반환합니다 Array.

GetHashCode()

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetLength(Int32)

지정된 차원의 요소 수를 나타내는 32비트 정수를 Array가져옵니다.

GetLongLength(Int32)

지정된 차원의 요소 수를 나타내는 64비트 정수를 Array가져옵니다.

GetLowerBound(Int32)

배열에서 지정된 차원의 첫 번째 요소 인덱스입니다.

GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
GetUpperBound(Int32)

배열에서 지정된 차원의 마지막 요소 인덱스입니다.

GetValue(Int32, Int32, Int32)

3차원 Array의 지정된 위치에 있는 값을 가져옵니다. 인덱스는 32비트 정수로 지정됩니다.

GetValue(Int32, Int32)

2차원 Array의 지정된 위치에 있는 값을 가져옵니다. 인덱스는 32비트 정수로 지정됩니다.

GetValue(Int32)

1차원 Array의 지정된 위치에 있는 값을 가져옵니다. 인덱스는 32비트 정수로 지정됩니다.

GetValue(Int32[])

다차원 Array에서 지정된 위치에 있는 값을 가져옵니다. 인덱스는 32비트 정수의 배열로 지정됩니다.

GetValue(Int64, Int64, Int64)

3차원 Array의 지정된 위치에 있는 값을 가져옵니다. 인덱스는 64비트 정수로 지정됩니다.

GetValue(Int64, Int64)

2차원 Array의 지정된 위치에 있는 값을 가져옵니다. 인덱스는 64비트 정수로 지정됩니다.

GetValue(Int64)

1차원 Array의 지정된 위치에 있는 값을 가져옵니다. 인덱스는 64비트 정수로 지정됩니다.

GetValue(Int64[])

다차원 Array에서 지정된 위치에 있는 값을 가져옵니다. 인덱스는 64비트 정수의 배열로 지정됩니다.

IndexOf(Array, Object, Int32, Int32)

1차원 배열의 요소 범위에서 지정된 개체를 검색하고 ifs가 처음 나타나는 인덱스를 반환합니다. 지정된 개수의 요소에 대해 지정된 인덱스에서 범위가 확장됩니다.

IndexOf(Array, Object, Int32)

1차원 배열의 요소 범위에서 지정된 개체를 검색하고 첫 번째 항목의 인덱스가 반환됩니다. 범위는 지정된 인덱스에서 배열의 끝까지 확장됩니다.

IndexOf(Array, Object)

지정된 개체를 검색하고 1차원 배열에서 첫 번째 항목의 인덱스가 반환됩니다.

IndexOf<T>(T[], T, Int32, Int32)

1차원 배열의 요소 범위에서 지정된 개체를 검색하고 첫 번째 항목의 인덱스가 반환됩니다. 지정된 개수의 요소에 대해 지정된 인덱스에서 범위가 확장됩니다.

IndexOf<T>(T[], T, Int32)

1차원 배열의 요소 범위에서 지정된 개체를 검색하고 첫 번째 항목의 인덱스가 반환됩니다. 범위는 지정된 인덱스에서 배열의 끝까지 확장됩니다.

IndexOf<T>(T[], T)

지정된 개체를 검색하고 1차원 배열에서 첫 번째 항목의 인덱스가 반환됩니다.

Initialize()

값 형식 Array 의 매개 변수가 없는 생성자를 호출하여 값 형식의 모든 요소를 초기화합니다.

LastIndexOf(Array, Object, Int32, Int32)

지정된 개체를 검색하고 지정된 개수의 요소를 포함하고 지정된 인덱스에서 끝나는 1차원 Array 요소 범위 내에서 마지막으로 발생한 인덱스를 반환합니다.

LastIndexOf(Array, Object, Int32)

지정된 개체를 검색하고 첫 번째 요소에서 지정된 인덱스로 확장되는 1차원 Array 요소 범위 내에서 마지막으로 발생한 항목의 인덱스를 반환합니다.

LastIndexOf(Array, Object)

지정된 개체를 검색하고 전체 1차원 내에서 마지막으로 발생한 인덱스 값을 반환합니다 Array.

LastIndexOf<T>(T[], T, Int32, Int32)

지정된 개체를 검색하고 지정된 개수의 요소를 포함하고 지정된 인덱스에서 Array 끝나는 요소 범위 내에서 마지막으로 발생한 인덱스를 반환합니다.

LastIndexOf<T>(T[], T, Int32)

지정된 개체를 검색하고 첫 번째 요소에서 지정된 인덱스로 확장되는 요소 Array 범위 내에서 마지막으로 발생한 항목의 인덱스를 반환합니다.

LastIndexOf<T>(T[], T)

지정된 개체를 검색하고 전체 Array내에서 마지막으로 발생한 인덱스 값을 반환합니다.

MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
Resize<T>(T[], Int32)

1차원 배열의 요소 수를 지정된 새 크기로 변경합니다.

Reverse(Array, Int32, Int32)

1차원 요소의 하위 집합 시퀀스를 반대로 바뀝니다 Array.

Reverse(Array)

전체 1차원 요소의 시퀀스를 반대로 바꿉니다 Array.

Reverse<T>(T[], Int32, Int32)

1차원 제네릭 배열에 있는 요소 하위 집합의 시퀀스를 반대로 바뀝니다.

Reverse<T>(T[])

1차원 제네릭 배열의 요소 시퀀스를 반대로 바뀝니다.

SetValue(Object, Int32, Int32, Int32)

값을 3차원 Array의 지정된 위치에 있는 요소로 설정합니다. 인덱스는 32비트 정수로 지정됩니다.

SetValue(Object, Int32, Int32)

값을 2차원 Array의 지정된 위치에 있는 요소로 설정합니다. 인덱스는 32비트 정수로 지정됩니다.

SetValue(Object, Int32)

값을 1차원 Array의 지정된 위치에 있는 요소로 설정합니다. 인덱스는 32비트 정수로 지정됩니다.

SetValue(Object, Int32[])

값을 다차원 Array의 지정된 위치에 있는 요소로 설정합니다. 인덱스는 32비트 정수의 배열로 지정됩니다.

SetValue(Object, Int64, Int64, Int64)

값을 3차원 Array의 지정된 위치에 있는 요소로 설정합니다. 인덱스는 64비트 정수로 지정됩니다.

SetValue(Object, Int64, Int64)

값을 2차원 Array의 지정된 위치에 있는 요소로 설정합니다. 인덱스는 64비트 정수로 지정됩니다.

SetValue(Object, Int64)

값을 1차원 Array의 지정된 위치에 있는 요소로 설정합니다. 인덱스는 64비트 정수로 지정됩니다.

SetValue(Object, Int64[])

값을 다차원 Array의 지정된 위치에 있는 요소로 설정합니다. 인덱스는 64비트 정수의 배열로 지정됩니다.

Sort(Array, Array, IComparer)

지정된 IComparer키를 사용하여 첫 번째 Array 키에 따라 1차원 Array 개체 쌍(하나는 키를 포함하고 다른 하나는 해당 항목을 포함함)을 정렬합니다.

Sort(Array, Array, Int32, Int32, IComparer)

지정된 IComparer개체를 사용하여 첫 번째 Array 키에 따라 1차원 Array 개체 쌍의 요소 범위를 정렬합니다(하나는 키를 포함하고 다른 하나는 해당 항목을 포함함).

Sort(Array, Array, Int32, Int32)

각 키의 구현을 사용하여 IComparable 첫 번째 Array 키에 따라 1차원 Array 개체 쌍의 요소 범위를 정렬합니다(하나는 키를 포함하고 다른 하나는 해당 항목을 포함함).

Sort(Array, Array)

각 키의 구현을 사용하여 IComparable 첫 번째 Array 키에 따라 1차원 Array 개체 쌍(하나는 키를 포함하고 다른 하나는 해당 항목을 포함함)을 정렬합니다.

Sort(Array, IComparer)

지정된 요소를 사용하여 1차원 Array 의 요소를 정렬합니다 IComparer.

Sort(Array, Int32, Int32, IComparer)

지정된 요소를 사용하여 1차원 Array 요소 범위의 요소를 정렬합니다 IComparer.

Sort(Array, Int32, Int32)

각 요소의 구현을 사용하여 IComparable 1차원 Array 요소 범위의 요소를 정렬합니다Array.

Sort(Array)

각 요소의 구현을 사용하여 IComparable 전체 1차원 Array 의 요소를 정렬합니다Array.

Sort<T>(T[], Comparison<T>)

지정한 을 사용하여 요소를 Array 정렬합니다 Comparison<T>.

Sort<T>(T[], IComparer<T>)

지정된 IComparer<T> 제네릭 인터페이스를 Array 사용하여 요소를 정렬합니다.

Sort<T>(T[], Int32, Int32, IComparer<T>)

지정된 IComparer<T> 제네릭 인터페이스를 사용하여 요소 범위의 요소를 Array 정렬합니다.

Sort<T>(T[], Int32, Int32)

각 요소의 제네릭 인터페이스 구현을 Array 사용하여 IComparable<T> 요소 범위의 요소를 정렬합니다 Array.

Sort<T>(T[])

각 요소의 제네릭 인터페이스 구현을 사용하여 전체 Array 요소를 정렬합니다Array.IComparable<T>

Sort<TKey,TValue>(TKey[], TValue[], IComparer<TKey>)

지정된 IComparer<T> 제네릭 인터페이스를 사용하여 첫 번째 Array 키에 따라 개체 쌍Array(하나는 키를 포함하고 다른 하나는 해당 항목을 포함함)을 정렬합니다.

Sort<TKey,TValue>(TKey[], TValue[], Int32, Int32, IComparer<TKey>)

지정된 IComparer<T> 제네릭 인터페이스를 사용하여 첫 번째 Array 키에 따라 개체 쌍의 Array 요소 범위를 정렬합니다(하나는 키를 포함하고 다른 하나는 해당 항목을 포함함).

Sort<TKey,TValue>(TKey[], TValue[], Int32, Int32)

각 키의 제네릭 인터페이스 구현을 사용하여 IComparable<T> 첫 번째 Array 키에 따라 개체 쌍의 Array 요소 범위를 정렬합니다(하나는 키를 포함하고 다른 하나는 해당 항목을 포함함).

Sort<TKey,TValue>(TKey[], TValue[])

각 키의 Array 제네릭 인터페이스 구현을 사용하여 IComparable<T> 첫 번째 Array 키에 따라 개체 쌍(하나는 키를 포함하고 다른 하나는 해당 항목을 포함함)을 정렬합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
TrueForAll<T>(T[], Predicate<T>)

배열의 모든 요소가 지정된 조건자로 정의된 조건과 일치하는지 여부를 결정합니다.

명시적 인터페이스 구현

Name Description
ICollection.Count

에 포함된 Array요소 수를 가져옵니다.

ICollection.IsSynchronized

Array 대한 액세스가 동기화되는지 여부를 나타내는 값을 가져옵니다(스레드로부터 안전).

ICollection.SyncRoot

Array대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.

IList.Add(Object)

이 메서드를 호출하면 항상 예외가 NotSupportedException throw됩니다.

IList.Clear()

에서 모든 항목을 IList제거합니다.

IList.Contains(Object)

요소가 .에 IList있는지 여부를 확인합니다.

IList.IndexOf(Object)

에서 특정 항목의 인덱스를 IList결정합니다.

IList.Insert(Int32, Object)

지정된 인덱스에 항목을 IList 삽입합니다.

IList.IsFixedSize

Array 고정 크기인지 여부를 나타내는 값을 가져옵니다.

IList.IsReadOnly

Array 읽기 전용인지 여부를 나타내는 값을 가져옵니다.

IList.Item[Int32]

지정된 인덱스에서 요소를 가져오거나 설정합니다.

IList.Remove(Object)

에서 특정 개체의 첫 번째 항목을 제거합니다 IList.

IList.RemoveAt(Int32)

지정된 인덱스의 IList 항목을 제거합니다.

IStructuralComparable.CompareTo(Object, IComparer)

현재 컬렉션 개체가 정렬 순서에서 다른 개체의 앞에 오거나, 같은 위치에서 발생하거나, 다른 개체를 따르는지 여부를 결정합니다.

IStructuralEquatable.Equals(Object, IEqualityComparer)

개체가 현재 인스턴스와 같은지 여부를 확인합니다.

IStructuralEquatable.GetHashCode(IEqualityComparer)

현재 인스턴스에 대한 해시 코드를 반환합니다.

확장명 메서드

Name Description
AsParallel(IEnumerable)

쿼리의 병렬 처리를 사용하도록 설정합니다.

AsQueryable(IEnumerable)

IEnumerable IQueryable변환합니다.

Cast<TResult>(IEnumerable)

IEnumerable 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable 요소를 필터링합니다.

적용 대상

스레드 보안

이 형식의 공용 정적(Shared Visual Basic) 멤버는 스레드로부터 안전합니다. 모든 인스턴스 멤버는 스레드로부터 안전하게 보호되지 않습니다.

이 구현은 Array;에 대한 동기화된(스레드로부터 안전한) 래퍼를 제공하지 않습니다. 그러나 Array 기반의 .NET 클래스는 SyncRoot 속성을 사용하여 자체 동기화된 버전의 컬렉션을 제공합니다.

컬렉션을 열거하는 것은 본질적으로 스레드로부터 안전한 프로시저가 아닙니다. 컬렉션이 동기화된 경우에도 다른 스레드는 컬렉션을 수정할 수 있으므로 열거자가 예외를 throw합니다. 열거 중 스레드 안전을 보장하기 위해 전체 열거 중에 컬렉션을 잠그거나 다른 스레드의 변경으로 인한 예외를 catch할 수 있습니다.

추가 정보