Vector<T>.TryCopyTo 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.
Overloads
TryCopyTo(Span<Byte>) |
Attempts to copy the vector to the given byte span. |
TryCopyTo(Span<T>) |
Attempts to copy the vector to the given Span<T>. |
TryCopyTo(Span<Byte>)
- Source:
- Vector_1.cs
- Source:
- Vector_1.cs
- Source:
- Vector_1.cs
Attempts to copy the vector to the given byte span.
public:
bool TryCopyTo(Span<System::Byte> destination);
public readonly bool TryCopyTo (Span<byte> destination);
public bool TryCopyTo (Span<byte> destination);
member this.TryCopyTo : Span<byte> -> bool
Public Function TryCopyTo (destination As Span(Of Byte)) As Boolean
Parameters
The destination span to which the values are copied. The destination span must be at least size Count.
Returns
true
if the source vector was successfully copied to destination
. false
if destination
is not large enough to hold the source vector.
Exceptions
.NET 5 and later: Type T
is not supported.
Applies to
TryCopyTo(Span<T>)
- Source:
- Vector_1.cs
- Source:
- Vector_1.cs
- Source:
- Vector_1.cs
Attempts to copy the vector to the given Span<T>.
public:
bool TryCopyTo(Span<T> destination);
public readonly bool TryCopyTo (Span<T> destination);
public bool TryCopyTo (Span<T> destination);
member this.TryCopyTo : Span<'T (requires 'T : struct)> -> bool
member this.TryCopyTo : Span<'T> -> bool
Public Function TryCopyTo (destination As Span(Of T)) As Boolean
Parameters
- destination
- Span<T>
The destination span to which the values are copied. The destination span must be at least size Count.
Returns
true
if the source vector was successfully copied to destination
. false
if destination
is not large enough to hold the source vector.
Exceptions
.NET 5 and later: Type T
is not supported.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om