Share via


InkRecognizerCollection.CopyTo Method

Copies the elements of the collection to an InkRecognizer array, starting at a particular index.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.dll)

Syntax

'Declaration
Public Sub CopyTo ( _
    array As InkRecognizer(), _
    index As Integer _
)
'Usage
Dim instance As InkRecognizerCollection 
Dim array As InkRecognizer()
Dim index As Integer

instance.CopyTo(array, index)
public void CopyTo(
    InkRecognizer[] array,
    int index
)
public:
void CopyTo(
    array<InkRecognizer^>^ array, 
    int index
)
public function CopyTo(
    array : InkRecognizer[], 
    index : int
)

Parameters

  • array
    Type: array<System.Windows.Ink.InkRecognizer[]

    The one-dimensional array that is the destination for the elements copied from the collection. The array must have zero-based indexing.

  • index
    Type: System.Int32

    The zero-based index in array at which copying begins.

Remarks

An exception is thrown in the following cases:

  • The array is a nulla null reference (Nothing in Visual Basic) (Nothing in Visual Basic .NET) reference.

  • The array is multidimensional.

  • The index is less than zero.

  • The index is equal to or greater than the length of array.

  • The number of elements in the collection is higher than the available space from the index to the end of array.

Examples

The following example copies the recognizers in the InkRecognizerCollection, theInkRecognizerCollection, to an InkRecognizer array.

' Check if there are recognizers in the collection. 
Dim theCount As Integer = theInkRecognizerCollection.Count
If 0 < theCount Then 
    ' Copy the recognizers in the collection to an array. 
    Dim theRecognizers(theCount) As InkRecognizer
    theInkRecognizerCollection.CopyTo(theRecognizers, 0)
    ' Insert code here. 
End If
// Check if there are recognizers in the collection. 
int theCount = theInkRecognizerCollection.Count;
if (0 < theCount)
{
    // Copy the recognizers in the collection to an array.
    InkRecognizer[] theRecognizers =
        new InkRecognizer[theCount];
    theInkRecognizerCollection.CopyTo(theRecognizers, 0);

    // Insert code here.
}

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizerCollection Class

InkRecognizerCollection Members

System.Windows.Ink Namespace