Gemstone PhasorProtocols Library
Show/Hide TOC

# CommonCopyImage(Byte, Byte, Int32, Int32) Method

This is a common optimized block copy function for binary data.

## Definition

Namespace: Gemstone.PhasorProtocols
Assembly: Gemstone.PhasorProtocols (in Gemstone.PhasorProtocols.dll) Version: 1.0.150 -- Release Build+0627019d4c17e2f915e64987b3f2371651facacb
C#
View Source Request Example

    public static void CopyImage(
    	this byte[] source,
    	byte[] destination,
    	ref int index,
    	int length
    )

VB
View Source Request Example

    <ExtensionAttribute>
    Public Shared Sub CopyImage (
    	source As Byte(),
    	destination As Byte(),
    	ByRef index As Integer,
    	length As Integer
    )

C++
View Source Request Example

    public:
    [ExtensionAttribute]
    static void CopyImage(
    	array<unsigned char>^ source,
    	array<unsigned char>^ destination,
    	int% index,
    	int length
    )

JavaScript
View Source Request Example

    Gemstone.PhasorProtocols.Common.CopyImage = function(source, destination, index, length);

#### Parameters

source Byte
  Source buffer to copy data from.
destination Byte
  Destination buffer to hold copied buffer data.
index Int32
  Index into destination buffer to begin copy. Index is automatically incremented by length.
length Int32
  Number of bytes to copy from source.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Byte. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

## Remarks

Source index is always zero so hence not requested. This function automatically advances index for convenience.

## See Also

#### Reference

Common Class
CopyImage Overload
Gemstone.PhasorProtocols Namespace