Método Marshal.Copy (Single[], Int32, IntPtr, Int32)
Publicado: agosto de 2016
Dica
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.
Copia os dados de uma matriz de número de ponto flutuante de precisão simples unidimensional gerenciada para um ponteiro de memória não gerenciada.
Namespace: System.Runtime.InteropServices
Assembly: mscorlib (em mscorlib.dll)
Sintaxe
[SecurityCriticalAttribute]
public static void Copy(
float[] source,
int startIndex,
IntPtr destination,
int length
)
public:
[SecurityCriticalAttribute]
static void Copy(
array<float>^ source,
int startIndex,
IntPtr destination,
int length
)
[<SecurityCriticalAttribute>]
static member Copy :
source:float32[] *
startIndex:int *
destination:nativeint *
length:int -> unit
<SecurityCriticalAttribute>
Public Shared Sub Copy (
source As Single(),
startIndex As Integer,
destination As IntPtr,
length As Integer
)
Parâmetros
source
Type: System.Single[]A matriz unidimensional a ser copiada.
startIndex
Type: System.Int32O índice baseado em zero na matriz de origem em que a cópia deve iniciar.
destination
Type: System.IntPtrO ponteiro de memória para o qual copiar.
length
Type: System.Int32O número de elementos da matriz a copiar.
Exceções
Exception | Condition |
---|---|
ArgumentOutOfRangeException | startIndex e length não são válidos. |
ArgumentNullException | source, startIndex, destination ou length é null. |
Comentários
Você pode usar esse método para copiar um subconjunto de uma matriz unidimensional de gerenciado para uma matriz de estilo C não gerenciada.
Segurança
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Informações de Versão
Plataforma Universal do Windows
Disponível desde 8
.NET Framework
Disponível desde 1.1
Biblioteca de Classes Portátil
Com suporte no: plataformas portáteis do .NET
Silverlight
Disponível desde 2.0
Windows Phone Silverlight
Disponível desde 7.0
Windows Phone
Disponível desde 8.1
Confira Também
Copy Sobrecarga
Classe Marshal
Namespace System.Runtime.InteropServices
Retornar ao início