Bewerken

Delen via


Vector<T>.TryCopyTo Method

Definition

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

destination
Span<Byte>

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