Share via


InkRecognizerBaseCollection.CopyTo Method

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

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Syntax

'Declaration
Public Sub CopyTo ( _
    recognizers As InkRecognizerBase(), _
    index As Integer _
)
'Usage
Dim instance As InkRecognizerBaseCollection 
Dim recognizers As InkRecognizerBase()
Dim index As Integer

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

Parameters

  • 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 null (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.

Examples

The following example copies the recognizers in the InkRecognizerBaseCollection, theInkRecognizerCollection, to an InkRecognizerBase 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 InkRecognizerBase
    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.
                    System.Windows.Ink.AnalysisCore.InkRecognizerBase[] theRecognizers =
                        new InkRecognizerBase[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

InkRecognizerBaseCollection Class

InkRecognizerBaseCollection Members

System.Windows.Ink.AnalysisCore Namespace