ArraySegment<T> ArraySegment<T> ArraySegment<T> ArraySegment<T> Struct

정의

1차원 배열의 섹션을 구분합니다.Delimits a section of a one-dimensional array.

generic <typename T>
public value class ArraySegment : System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::Generic::IReadOnlyCollection<T>, System::Collections::Generic::IReadOnlyList<T>
[System.Serializable]
public struct ArraySegment<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>
type ArraySegment<'T> = struct
    interface IList<'T>
    interface IReadOnlyList<'T>
    interface ICollection<'T>
    interface seq<'T>
    interface IEnumerable
    interface IReadOnlyCollection<'T>
Public Structure ArraySegment(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IList(Of T), IReadOnlyCollection(Of T), IReadOnlyList(Of T)

형식 매개 변수

T

배열 세그먼트의 요소 형식입니다.The type of the elements in the array segment.

상속
ArraySegment<T>ArraySegment<T>ArraySegment<T>ArraySegment<T>
특성
구현

예제

다음 코드 예제에서는 전달 된 ArraySegment<T> 메서드에 구조체.The following code example passes an ArraySegment<T> structure to a method.

using namespace System;


namespace Sample
{
    public ref class SampleArray  
    {
    public:
        static void Work()  
        {

            // Create and initialize a new string array.
            array <String^>^ words = {"The", "quick", "brown",
                "fox", "jumps", "over", "the", "lazy", "dog"};

            // Display the initial contents of the array.
            Console::WriteLine("The first array segment"
		        " (with all the array's elements) contains:");
            PrintIndexAndValues(words);

            // Define an array segment that contains the entire array.
            ArraySegment<String^> segment(words);
			
            // Display the contents of the ArraySegment.
            Console::WriteLine("The first array segment"
                " (with all the array's elements) contains:");
            PrintIndexAndValues(segment);

            // Define an array segment that contains the middle five 
            // values of the array.
            ArraySegment<String^> middle(words, 2, 5);
            
            // Display the contents of the ArraySegment.
            Console::WriteLine("The second array segment"
                " (with the middle five elements) contains:");
            PrintIndexAndValues(middle);

            // Modify the fourth element of the first array 
            // segment
            segment.Array[3] = "LION";

            // Display the contents of the second array segment 
            // middle. Note that the value of its second element 
            // also changed.
            Console::WriteLine("After the first array segment"
                " is modified,the second array segment"
                " now contains:");
            PrintIndexAndValues(middle);
            Console::ReadLine();
        }

        static void PrintIndexAndValues(ArraySegment<String^>^ segment)  
        {
            for (int i = segment->Offset; 
                i < (segment->Offset + segment->Count); i++)  
            {
                Console::WriteLine("   [{0}] : {1}", i,
                    segment->Array[i]);
            }
            Console::WriteLine();
        }

        static void PrintIndexAndValues(array<String^>^ words) 
        {
            for (int i = 0; i < words->Length; i++)  
            {
                Console::WriteLine("   [{0}] : {1}", i,
                    words[i]);
            }
            Console::WriteLine();
        }
    };
}

int main()
{
    Sample::SampleArray::Work();
    return 0; 
}


    /* 
    This code produces the following output.

    The original array initially contains:
    [0] : The
    [1] : quick
    [2] : brown
    [3] : fox
    [4] : jumps
    [5] : over
    [6] : the
    [7] : lazy
    [8] : dog

    The first array segment (with all the array's elements) contains:
    [0] : The
    [1] : quick
    [2] : brown
    [3] : fox
    [4] : jumps
    [5] : over
    [6] : the
    [7] : lazy
    [8] : dog

    The second array segment (with the middle five elements) contains:
    [2] : brown
    [3] : fox
    [4] : jumps
    [5] : over
    [6] : the

    After the first array segment is modified, the second array segment now contains:
    [2] : brown
    [3] : LION
    [4] : jumps
    [5] : over
    [6] : the

    */

using System;

public class SamplesArray  {
 
   public static void Main()  {
 
      // Create and initialize a new string array.
      String[] myArr = { "The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog" };
 
      // Display the initial contents of the array.
      Console.WriteLine( "The original array initially contains:" );
      PrintIndexAndValues( myArr );

      // Define an array segment that contains the entire array.
      ArraySegment<String> myArrSegAll = new ArraySegment<String>( myArr );

      // Display the contents of the ArraySegment.
      Console.WriteLine( "The first array segment (with all the array's elements) contains:" );
      PrintIndexAndValues( myArrSegAll );

      // Define an array segment that contains the middle five values of the array.
      ArraySegment<String> myArrSegMid = new ArraySegment<String>( myArr, 2, 5 );

      // Display the contents of the ArraySegment.
      Console.WriteLine( "The second array segment (with the middle five elements) contains:" );
      PrintIndexAndValues( myArrSegMid );

      // Modify the fourth element of the first array segment myArrSegAll.
      myArrSegAll.Array[3] = "LION";

      // Display the contents of the second array segment myArrSegMid.
      // Note that the value of its second element also changed.
      Console.WriteLine( "After the first array segment is modified, the second array segment now contains:" );
      PrintIndexAndValues( myArrSegMid );

   }
 
   public static void PrintIndexAndValues( ArraySegment<String> arrSeg )  {
      for ( int i = arrSeg.Offset; i < (arrSeg.Offset + arrSeg.Count); i++ )  {
         Console.WriteLine( "   [{0}] : {1}", i, arrSeg.Array[i] );
      }
      Console.WriteLine();
   }

   public static void PrintIndexAndValues( String[] myArr )  {
      for ( int i = 0; i < myArr.Length; i++ )  {
         Console.WriteLine( "   [{0}] : {1}", i, myArr[i] );
      }
      Console.WriteLine();
   }

}


/* 
This code produces the following output.

The original array initially contains:
   [0] : The
   [1] : quick
   [2] : brown
   [3] : fox
   [4] : jumps
   [5] : over
   [6] : the
   [7] : lazy
   [8] : dog

The first array segment (with all the array's elements) contains:
   [0] : The
   [1] : quick
   [2] : brown
   [3] : fox
   [4] : jumps
   [5] : over
   [6] : the
   [7] : lazy
   [8] : dog

The second array segment (with the middle five elements) contains:
   [2] : brown
   [3] : fox
   [4] : jumps
   [5] : over
   [6] : the

After the first array segment is modified, the second array segment now contains:
   [2] : brown
   [3] : LION
   [4] : jumps
   [5] : over
   [6] : the

*/

Imports System

Public Class SamplesArray

    Public Shared Sub Main()

        ' Create and initialize a new string array.
        Dim myArr As String() =  {"The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"}

        ' Display the initial contents of the array.
        Console.WriteLine("The original array initially contains:")
        PrintIndexAndValues(myArr)

        ' Define an array segment that contains the entire array.
        Dim myArrSegAll As New ArraySegment(Of String)(myArr)

        ' Display the contents of the ArraySegment.
        Console.WriteLine("The first array segment (with all the array's elements) contains:")
        PrintIndexAndValues(myArrSegAll)

        ' Define an array segment that contains the middle five values of the array.
        Dim myArrSegMid As New ArraySegment(Of String)(myArr, 2, 5)

        ' Display the contents of the ArraySegment.
        Console.WriteLine("The second array segment (with the middle five elements) contains:")
        PrintIndexAndValues(myArrSegMid)

        ' Modify the fourth element of the first array segment myArrSegAll.
        myArrSegAll.Array(3) = "LION"

        ' Display the contents of the second array segment myArrSegMid.
        ' Note that the value of its second element also changed.
        Console.WriteLine("After the first array segment is modified, the second array segment now contains:")
        PrintIndexAndValues(myArrSegMid)

    End Sub 'Main

    Public Shared Sub PrintIndexAndValues(arrSeg As ArraySegment(Of String))
        Dim i As Integer
        For i = arrSeg.Offset To (arrSeg.Offset + arrSeg.Count - 1)
            Console.WriteLine("   [{0}] : {1}", i, arrSeg.Array(i))
        Next i
        Console.WriteLine()
    End Sub 'PrintIndexAndValues 

    Public Shared Sub PrintIndexAndValues(myArr as String())
        Dim i As Integer
        For i = 0 To (myArr.Length - 1)
            Console.WriteLine("   [{0}] : {1}", i, myArr(i))
        Next i
        Console.WriteLine()
    End Sub 'PrintIndexAndValues 

End Class 'SamplesArray


'This code produces the following output.
'
'The original array initially contains:
'   [0] : The
'   [1] : quick
'   [2] : brown
'   [3] : fox
'   [4] : jumps
'   [5] : over
'   [6] : the
'   [7] : lazy
'   [8] : dog
'
'The first array segment (with all the array's elements) contains:
'   [0] : The
'   [1] : quick
'   [2] : brown
'   [3] : fox
'   [4] : jumps
'   [5] : over
'   [6] : the
'   [7] : lazy
'   [8] : dog
'
'The second array segment (with the middle five elements) contains:
'   [2] : brown
'   [3] : fox
'   [4] : jumps
'   [5] : over
'   [6] : the
'
'After the first array segment is modified, the second array segment now contains:
'   [2] : brown
'   [3] : LION
'   [4] : jumps
'   [5] : over
'   [6] : the

설명

ArraySegment<T> 해당 배열에서 요소의 범위를 구분 하는 배열 래퍼입니다.ArraySegment<T> is a wrapper around an array that delimits a range of elements in that array. 여러 ArraySegment<T> 인스턴스가 동일한 원래 배열에 참조할 수 있으며 겹칠 수 있습니다.Multiple ArraySegment<T> instances can refer to the same original array and can overlap. 원본 배열을 1 차원 이어야 하며 0부터 시작 하는 인덱스가 있어야 합니다.The original array must be one-dimensional and must have zero-based indexing.

참고

ArraySegment<T> 구현 합니다 IReadOnlyCollection<T> 로 시작 하는 인터페이스를 .NET Framework 4.6.NET Framework 4.6; 이전 버전의.NET Framework는 ArraySegment<T> 구조는이 인터페이스를 구현 하지 않았습니다.ArraySegment<T> implements the IReadOnlyCollection<T> interface starting with the .NET Framework 4.6.NET Framework 4.6; in previous versions of the .NET Framework, the ArraySegment<T> structure did not implement this interface.

ArraySegment<T> 구조는 서로 다른 세그먼트에서 배열의 요소를 조작할 수는 때마다 유용 합니다.The ArraySegment<T> structure is useful whenever the elements of an array will be manipulated in distinct segments. 예:For example:

  • 전달할 수 있습니다는 ArraySegment<T> 비교적 비용이 많이 드는 메서드 같은 호출 하지 않고 메서드에 인수로 배열을 부분만 나타내는 개체 Copy 배열 일부의 복사본을 전달 합니다.You can pass an ArraySegment<T> object that represents only a portion of an array as an argument to a method, rather than call a relatively expensive method like Copy to pass a copy of a portion of an array.

  • 다중 스레드 앱에서는 사용할 수는 ArraySegment<T> 배열의 일부만 작업할 각 스레드는 구조입니다.In a multithreaded app, you can use the ArraySegment<T> structure to have each thread operate on only a portion of the array.

  • 작업 기반 비동기 작업을 사용할 수 있습니다는 ArraySegment<T> 개체를 고유 배열 세그먼트에서 각 작업 작동 하는지 확인 합니다.For task-based asynchronous operations, you can use an ArraySegment<T> object to ensure that each task operates on a distinct segment of the array. 다음 예제에서는 최대 10 개의 요소를 사용 하 여 개별 세그먼트로 배열을 나눕니다.The following example divides an array into individual segments with up to ten elements. 세그먼트의 각 요소를 해당 세그먼트 수를 곱합니다.Each element in the segment is multiplied by its segment number. 결과 사용 하 여 표시를 ArraySegment<T> 이 방식으로 요소를 조작 하는 클래스는 기본 배열의 값을 변경 합니다.The result shows that using the ArraySegment<T> class to manipulate elements in this way changes the values of its underlying array.

    using System;
    using System.Collections.Generic;
    using System.Threading.Tasks;
    
    public class Example
    {
       private const int segmentSize = 10;
       
       public static async Task Main()
       {
          List<Task> tasks = new List<Task>();
    
          // Create array.
          int[] arr = new int[50];
          for (int ctr = 0; ctr <= arr.GetUpperBound(0); ctr++)
             arr[ctr] = ctr + 1;
    
          // Handle array in segments of 10.
          for (int ctr = 1; ctr <= Math.Ceiling(((double)arr.Length)/segmentSize); ctr++) {
             int multiplier = ctr;
             int elements = (multiplier - 1) * 10 + segmentSize > arr.Length ?
                             arr.Length - (multiplier - 1) * 10 : segmentSize;
             ArraySegment<int> segment = new ArraySegment<int>(arr, (ctr - 1) * 10, elements);
             tasks.Add(Task.Run( () => { IList<int> list = (IList<int>) segment;
                                         for (int index = 0; index < list.Count; index++)
                                            list[index] = list[index] * multiplier;
                                       } ));
          }
          try {
             await Task.WhenAll(tasks.ToArray());
             int elementsShown = 0;
             foreach (var value in arr) {
                Console.Write("{0,3} ", value);
                elementsShown++;
                if (elementsShown % 18 == 0)
                   Console.WriteLine();
             }
          }
          catch (AggregateException e) {
             Console.WriteLine("Errors occurred when working with the array:");
             foreach (var inner in e.InnerExceptions)
                Console.WriteLine("{0}: {1}", inner.GetType().Name, inner.Message);
          }
       }
    }
    // The example displays the following output:
    //      1   2   3   4   5   6   7   8   9  10  22  24  26  28  30  32  34  36
    //     38  40  63  66  69  72  75  78  81  84  87  90 124 128 132 136 140 144
    //    148 152 156 160 205 210 215 220 225 230 235 240 245 250
    
    Imports System.Collections.Generic
    Imports System.Threading.Tasks
    
    Module Example
      Private Const SegmentSize As Integer = 10
      
       Public Sub Main()
          Dim tasks As New List(Of Task)
          
           ' Create array.
          Dim arr(49) As Integer
          For ctr As Integer = 0 To arr.GetUpperBound(0)
             arr(ctr) = ctr + 1
          Next
    
          ' Handle array in segments of 10.
          For ctr As Integer = 1 To CInt(Math.Ceiling(arr.Length / segmentSize))
             Dim multiplier As Integer = ctr
             Dim elements As Integer = If((multiplier - 1) * 10 + segmentSize > arr.Length,
                                          arr.Length - (multiplier - 1) * 10,
                                          segmentSize)
             Dim segment As New ArraySegment(Of Integer)(arr, (ctr - 1) * 10, elements)
             tasks.Add(Task.Run( Sub()
                                    Dim list As IList(Of Integer) = CType(segment, IList(Of Integer))
                                    For index As Integer = 0 To list.Count - 1
                                       list(index) = list(index) * multiplier
                                    Next
                                 End Sub ))
          Next
          Try
             Task.WaitAll(tasks.ToArray())
             Dim elementsShown As Integer = 0
             For Each value In arr
                Console.Write("{0,3} ", value)
                elementsShown += 1
                If elementsShown Mod 18 = 0 Then Console.WriteLine()
             Next
          Catch e As AggregateException
             Console.WriteLine("Errors occurred when working with the array:")
             For Each inner As Exception In e.InnerExceptions
                Console.WriteLine("{0}: {1}", inner.GetType().Name, inner.Message)
             Next
          End Try
       End Sub
    End Module
    ' The example displays the following output:
    '         1   2   3   4   5   6   7   8   9  10  22  24  26  28  30  32  34  36
    '        38  40  63  66  69  72  75  78  81  84  87  90 124 128 132 136 140 144
    '       148 152 156 160 205 210 215 220 225 230 235 240 245 250
    

단는 있지만 ArraySegment<T> 구조 배열 고유 세그먼트로 나누는 데 사용할 수 있습니다, 세그먼트가 서로 완전히 독립적입니다.Note, however, that although the ArraySegment<T> structure can be used to divide an array into distinct segments, the segments are not completely independent of one another. Array 전체 원래 배열, 배열의의 복사본이 아니라 반환; 따라서 변경 내용을 반환 하는 배열은 Array 원래 배열 속성 변경 됩니다.The Array property returns the entire original array, not a copy of the array; therefore, changes made to the array returned by the Array property are made to the original array. 배열의 복사본에 대해 작업을 수행 해야 필요 없는 경우 아닌 ArraySegment<T> 배열의 일부를 나타내는 개체입니다.If this is undesirable, you should perform operations on a copy of the array, rather than an ArraySegment<T> object that represents a portion of the array.

합니다 Equals 두 비교 하는 경우 메서드와 같음 및 같지 않음 연산자의 참조가 같은지 테스트 ArraySegment<T> 개체입니다.The Equals method and the equality and inequality operators test for reference equality when they compare two ArraySegment<T> objects. ArraySegment<T> 동일한 것으로 간주 하는 개체, 다음 조건이 모두 충족 해야 합니다.For two ArraySegment<T> objects to be considered equal, they must meet all of the following conditions:

  • 동일한 배열을 참조 합니다.Reference the same array.

  • 배열에 있는 동일한 인덱스에서 시작 합니다.Begin at the same index in the array.

  • 동일한 수의 요소입니다.Have the same number of elements.

요소에서 인덱스로 검색 하려는 경우는 ArraySegment<T> 개체를 캐스트 해야는 IList<T> 개체 및이 검색 하거나 사용 하 여 수정 합니다 IList<T>.Item[Int32] 속성.If you want to retrieve an element by its index in the ArraySegment<T> object, you must cast it to an IList<T> object and retrieve it or modify it by using the IList<T>.Item[Int32] property. 요소를 검색 하는 다음 예제는 ArraySegment<T> 문자열 배열의 섹션을 구분 하는 개체입니다.The following example retrieves the element in an ArraySegment<T> object that delimits a section of a string array.

using System;
using System.Collections.Generic;

public class Example
{
   public static void Main()
   {
      String[] names = { "Adam", "Bruce", "Charles", "Daniel", 
                         "Ebenezer", "Francis", "Gilbert", 
                         "Henry", "Irving", "John", "Karl",
                         "Lucian", "Michael" };
      var partNames = new ArraySegment<String>(names, 2, 5);
      
      // Cast the ArraySegment object to an IList<String> and enumerate it.
      var list = (IList<String>) partNames;
      for (int ctr = 0; ctr <= list.Count - 1; ctr++)
         Console.WriteLine(list[ctr]);
   }
}
// The example displays the following output:
//    Charles
//    Daniel
//    Ebenezer
//    Francis
//    Gilbert
Imports System.Collections.Generic

Module Example
   Public Sub Main()
      Dim names() As String = { "Adam", "Bruce", "Charles", "Daniel", 
                                "Ebenezer", "Francis", "Gilbert", 
                                "Henry", "Irving", "John", "Karl",
                                "Lucian", "Michael" }
      Dim partNames As New ArraySegment(Of String)(names, 2, 5)
      
      ' Cast the ArraySegment object to an IList<String> and enumerate it.
      Dim list = CType(partNames, IList(Of String))
      For ctr As Integer = 0 To list.Count - 1
         Console.WriteLine(list(ctr))
      Next     
   End Sub
End Module
' The example displays the following output:
'    Charles
'    Daniel
'    Ebenezer
'    Francis
'    Gilbert

생성자

ArraySegment<T>(T[]) ArraySegment<T>(T[]) ArraySegment<T>(T[]) ArraySegment<T>(T[])

지정된 배열의 모든 요소를 구분하는 ArraySegment<T> 구조체의 새 인스턴스를 초기화합니다.Initializes a new instance of the ArraySegment<T> structure that delimits all the elements in the specified array.

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

지정된 배열에서 지정된 범위의 요소를 구분하는 ArraySegment<T> 구조체의 새 인스턴스를 초기화합니다.Initializes a new instance of the ArraySegment<T> structure that delimits the specified range of the elements in the specified array.

속성

Array Array Array Array

배열 세그먼트가 구분하는 범위의 요소가 포함된 원본 배열을 가져옵니다.Gets the original array containing the range of elements that the array segment delimits.

Count Count Count Count

배열 세그먼트로 구분된 범위의 요소 수를 가져옵니다.Gets the number of elements in the range delimited by the array segment.

Empty Empty Empty Empty
Item[Int32] Item[Int32] Item[Int32] Item[Int32]
Offset Offset Offset Offset

배열 세그먼트로 구분된 범위의 첫 번째 요소 위치를 가져옵니다. 이 위치는 원본 배열의 시작에 상대적입니다.Gets the position of the first element in the range delimited by the array segment, relative to the start of the original array.

메서드

CopyTo(ArraySegment<T>) CopyTo(ArraySegment<T>) CopyTo(ArraySegment<T>) CopyTo(ArraySegment<T>)
CopyTo(T[]) CopyTo(T[]) CopyTo(T[]) CopyTo(T[])
CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32)
Equals(ArraySegment<T>) Equals(ArraySegment<T>) Equals(ArraySegment<T>) Equals(ArraySegment<T>)

지정된 ArraySegment<T> 구조체가 현재 인스턴스와 같은지 여부를 확인합니다.Determines whether the specified ArraySegment<T> structure is equal to the current instance.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

지정된 개체와 현재 개체가 같은지 여부를 확인합니다.Determines whether the specified object is equal to the current instance.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

현재 인스턴스의 해시 코드를 반환합니다.Returns the hash code for the current instance.

Slice(Int32) Slice(Int32) Slice(Int32) Slice(Int32)
Slice(Int32, Int32) Slice(Int32, Int32) Slice(Int32, Int32) Slice(Int32, Int32)
ToArray() ToArray() ToArray() ToArray()

연산자

Equality(ArraySegment<T>, ArraySegment<T>) Equality(ArraySegment<T>, ArraySegment<T>) Equality(ArraySegment<T>, ArraySegment<T>) Equality(ArraySegment<T>, ArraySegment<T>)

두 개의 ArraySegment<T> 구조체가 같은지 여부를 나타냅니다.Indicates whether two ArraySegment<T> structures are equal.

Implicit(T[] to ArraySegment<T>) Implicit(T[] to ArraySegment<T>) Implicit(T[] to ArraySegment<T>) Implicit(T[] to ArraySegment<T>)
Inequality(ArraySegment<T>, ArraySegment<T>) Inequality(ArraySegment<T>, ArraySegment<T>) Inequality(ArraySegment<T>, ArraySegment<T>) Inequality(ArraySegment<T>, ArraySegment<T>)

두 가지 ArraySegment<T> 구조체가 같지 않은지 여부를 나타냅니다.Indicates whether two ArraySegment<T> structures are unequal.

명시적 인터페이스 구현

ICollection<T>.Add(T) ICollection<T>.Add(T) ICollection<T>.Add(T) ICollection<T>.Add(T)

배열 세그먼트에 항목을 추가합니다.Adds an item to the array segment.

ICollection<T>.Clear() ICollection<T>.Clear() ICollection<T>.Clear() ICollection<T>.Clear()

배열 세그먼트에서 모든 항목을 제거합니다.Removes all items from the array segment.

ICollection<T>.Contains(T) ICollection<T>.Contains(T) ICollection<T>.Contains(T) ICollection<T>.Contains(T)

배열 세그먼트에 특정 값이 들어 있는지 여부를 확인합니다.Determines whether the array segment contains a specific value.

ICollection<T>.CopyTo(T[], Int32) ICollection<T>.CopyTo(T[], Int32) ICollection<T>.CopyTo(T[], Int32) ICollection<T>.CopyTo(T[], Int32)

지정한 배열 인덱스부터 배열 세그먼트의 요소를 배열에 복사합니다.Copies the elements of the array segment to an array, starting at the specified array index.

ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly

배열 세그먼트가 읽기 전용인지 여부를 나타내는 값을 가져옵니다.Gets a value that indicates whether the array segment is read-only.

ICollection<T>.Remove(T) ICollection<T>.Remove(T) ICollection<T>.Remove(T) ICollection<T>.Remove(T)

배열 세그먼트에서 특정 개체가 처음 나타나는 부분을 제거합니다.Removes the first occurrence of a specific object from the array segment.

IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator()

배열 세그먼트를 반복하는 열거자를 반환합니다.Returns an enumerator that iterates through the array segment.

IList<T>.IndexOf(T) IList<T>.IndexOf(T) IList<T>.IndexOf(T) IList<T>.IndexOf(T)

배열 세그먼트에서 특정 항목의 인덱스를 확인합니다.Determines the index of a specific item in the array segment.

IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T)

항목을 배열 세그먼트의 지정된 인덱스에 삽입합니다.Inserts an item into the array segment at the specified index.

IList<T>.Item[Int32] IList<T>.Item[Int32] IList<T>.Item[Int32] IList<T>.Item[Int32]

지정한 인덱스에 있는 요소를 가져오거나 설정합니다.Gets or sets the element at the specified index.

IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32)

지정된 인덱스에 있는 배열 세그먼트 항목을 제거합니다.Removes the array segment item at the specified index.

IReadOnlyList<T>.Item[Int32] IReadOnlyList<T>.Item[Int32] IReadOnlyList<T>.Item[Int32] IReadOnlyList<T>.Item[Int32]

배열 세그먼트의 지정된 인덱스에 있는 요소를 가져옵니다.Gets the element at the specified index of the array segment.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

배열 세그먼트를 반복하는 열거자를 반환합니다.Returns an enumerator that iterates through an array segment.

Extension Methods

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

반환을 DataTable 복사본이 들어 있는 DataRow 개체를 지정 된 입력 IEnumerable<T> 개체는 제네릭 매개 변수 TDataRow.Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

복사본 DataRow 지정 된 개체 DataTable, 지정 된 입력 IEnumerable<T> 개체는 제네릭 매개 변수 TDataRow합니다.Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

복사본 DataRow 지정 된 개체 DataTable, 지정 된 입력 IEnumerable<T> 개체는 제네릭 매개 변수 TDataRow합니다.Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

요소를 캐스팅을 IEnumerable 를 지정 된 형식입니다.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

요소를 필터링 하는 IEnumerable 지정된 된 형식에 기반 합니다.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

변환를 IEnumerableIQueryable합니다.Converts an IEnumerable to an IQueryable.

AsMemory<T>(ArraySegment<T>) AsMemory<T>(ArraySegment<T>) AsMemory<T>(ArraySegment<T>) AsMemory<T>(ArraySegment<T>)
AsMemory<T>(ArraySegment<T>, Int32) AsMemory<T>(ArraySegment<T>, Int32) AsMemory<T>(ArraySegment<T>, Int32) AsMemory<T>(ArraySegment<T>, Int32)
AsMemory<T>(ArraySegment<T>, Int32, Int32) AsMemory<T>(ArraySegment<T>, Int32, Int32) AsMemory<T>(ArraySegment<T>, Int32, Int32) AsMemory<T>(ArraySegment<T>, Int32, Int32)
AsSpan<T>(ArraySegment<T>) AsSpan<T>(ArraySegment<T>) AsSpan<T>(ArraySegment<T>) AsSpan<T>(ArraySegment<T>)
AsSpan<T>(ArraySegment<T>, Int32) AsSpan<T>(ArraySegment<T>, Int32) AsSpan<T>(ArraySegment<T>, Int32) AsSpan<T>(ArraySegment<T>, Int32)
AsSpan<T>(ArraySegment<T>, Int32, Int32) AsSpan<T>(ArraySegment<T>, Int32, Int32) AsSpan<T>(ArraySegment<T>, Int32, Int32) AsSpan<T>(ArraySegment<T>, Int32, Int32)
Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

소스 컬렉션에 있는 모든 노드의 상위 항목이 들어 있는 요소 컬렉션을 반환합니다.Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

소스 컬렉션에 있는 모든 노드의 상위 항목이 들어 있는 필터링된 요소 컬렉션을 반환합니다.Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 일치하는 XName이 있는 요소만 컬렉션에 포함됩니다.Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

소스 컬렉션에 있는 모든 문서 및 요소의 하위 노드 컬렉션을 반환합니다.Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

소스 컬렉션에 있는 모든 요소 및 문서의 하위 요소가 들어 있는 요소 컬렉션을 반환합니다.Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

소스 컬렉션에 있는 모든 요소 및 문서의 하위 요소가 들어 있는 필터링된 요소 컬렉션을 반환합니다.Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 일치하는 XName이 있는 요소만 컬렉션에 포함됩니다.Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

소스 컬렉션에 있는 모든 요소 및 문서의 자식 요소 컬렉션을 반환합니다.Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

소스 컬렉션에 있는 모든 요소 및 문서의 필터링된 자식 요소 컬렉션을 반환합니다.Returns a filtered collection of the child elements of every element and document in the source collection. 일치하는 XName이 있는 요소만 컬렉션에 포함됩니다.Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

소스 컬렉션의 모든 노드가 문서 순으로 정렬되어 들어 있는 노드 컬렉션을 반환합니다.Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

소스 컬렉션에 있는 모든 문서 및 요소의 자식 노드 컬렉션을 반환합니다.Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

부모 노드에서 소스 컬렉션의 모든 노드를 제거합니다.Removes every node in the source collection from its parent node.

적용 대상

추가 정보