共用方式為


InkRecognizerCollection.CopyTo 方法

從特定索引處開始,將集合的元素複製到 InkRecognizer 陣列。

命名空間:  System.Windows.Ink
組件:  IAWinFX (在 IAWinFX.dll 中)

語法

'宣告
Public Sub CopyTo ( _
    array As InkRecognizer(), _
    index As Integer _
)
'用途
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
)

參數

  • array
    型別:array<System.Windows.Ink.InkRecognizer[]
    一維陣列,這個陣列是從集合複製過來的元素之目的陣列。此陣列必須具有以零起始的索引。
  • index
    型別:System.Int32
    array 中以零起始的索引,位於複製開始的位置。

備註

在下列情況下,會擲回例外狀況:

  • array 為 nullNull 參照 (即 Visual Basic 中的 Nothing) (在 Visual Basic .NET 中為 Nothing) 參考。

  • array 為多維。

  • index 小於零。

  • index 等於或大於 array 的長度。

  • 集合中的元素數大於從 index 至 array 結尾的可用空間。

範例

下列範例會將 InkRecognizerCollection (theInkRecognizerCollection) 中的辨識器複製到 InkRecognizer 陣列。

' 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.
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkRecognizerCollection 類別

InkRecognizerCollection 成員

System.Windows.Ink 命名空間