Share via


InkRecognizerCollection.CopyTo Method

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

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in microsoft.ink.analysis.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 void CopyTo (
    InkRecognizer[] array, 
    int index
)
public function CopyTo (
    array : InkRecognizer[], 
    index : int
)
Not applicable.

Parameters

  • array
    The one-dimensional array that is the destination for the elements copied from the collection. The array must have zero-based indexing.
  • index
    The zero-based index in array at which copying begins.

Remarks

An exception is thrown in the following cases:

  • The array is a a null reference (Nothing in Visual Basic) (Nothing in Microsoft® 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.

Example

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 Microsoft.Ink.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.
    Microsoft.Ink.InkRecognizer[] theRecognizers =
        new InkRecognizer[theCount];
    theInkRecognizerCollection.CopyTo(theRecognizers, 0);

    // Insert code here.
}

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizerCollection Class
InkRecognizerCollection Members
Microsoft.Ink Namespace