CollectionExtensions.CopyTo<T>(List<T>, Span<T>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copies the entire List<T> to a span.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static void CopyTo(System::Collections::Generic::List<T> ^ list, Span<T> destination);
public static void CopyTo<T> (this System.Collections.Generic.List<T> list, Span<T> destination);
static member CopyTo : System.Collections.Generic.List<'T> * Span<'T> -> unit
<Extension()>
Public Sub CopyTo(Of T) (list As List(Of T), destination As Span(Of T))
Type Parameters
- T
The type of elements in the list.
Parameters
- list
- List<T>
The list from which the elements are copied.
- destination
- Span<T>
The span that is the destination of the elements copied from list
.
Exceptions
The list
is null
.
The number of elements in the source List<T> is greater than the number of elements that the destination span can contain.
Applies to
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.