System::Runtime::InteropServices::Marshal::Copy method

Marshal::Copy(const container&, int, IntPtr, int) method

Implements public static void Copy(char[] source, int startIndex, IntPtr destination, int length).

template<typename container> static void System::Runtime::InteropServices::Marshal::Copy(const container &source, int startIndex, IntPtr destination, int length)
ParameterDescription
containerSource container type.
ParameterTypeDescription
sourceconst container&Source data pointer.
startIndexintSource start index.
destinationIntPtrDestination data pointer.
lengthintNumber of elements to copy.

See Also

Marshal::Copy(const container&, int, void *, int) method

Implements public static void Copy(char[] source, int startIndex, IntPtr destination, int length).

template<typename container> static void System::Runtime::InteropServices::Marshal::Copy(const container &source, int startIndex, void *destination, int length)
ParameterDescription
containerSource container type.
ParameterTypeDescription
sourceconst container&Source data pointer.
startIndexintSource start index.
destinationvoid *Destination data pointer.
lengthintNumber of elements to copy.

See Also

Marshal::Copy(const IntPtr, container&&, int, int) method

Implements public static void Copy(IntPtr source, byte[] destination, int startIndex, int length) semantics.

template<typename container> static void System::Runtime::InteropServices::Marshal::Copy(const IntPtr source, container &&destination, int startIndex, int length)
ParameterDescription
containerDestination container type.
ParameterTypeDescription
sourceconst IntPtrSource data pointer.
destinationcontainer&&Container to copy data into.
startIndexintSource start index.
lengthintNumber of elements to copy.

See Also

Marshal::Copy(const void *, container&&, int, int) method

Implements public static void Copy(IntPtr source, byte[] destination, int startIndex, int length) semantics.

template<typename container> static void System::Runtime::InteropServices::Marshal::Copy(const void *source, container &&destination, int startIndex, int length)
ParameterDescription
containerDestination container type.
ParameterTypeDescription
sourceconst void *Source data pointer.
destinationcontainer&&Container to copy data into.
startIndexintSource start index.
lengthintNumber of elements to copy.

See Also