InkRecognizerBaseCollection.CopyTo 方法
從特定索引處開始,將集合的元素複製到 InkRecognizerBase 陣列。
命名空間: System.Windows.Ink.AnalysisCore
組件: IACore (在 IACore.dll 中)
語法
'宣告
Public Sub CopyTo ( _
recognizers As InkRecognizerBase(), _
index As Integer _
)
'用途
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 void CopyTo(
InkRecognizerBase[] recognizers,
int index
)
public function CopyTo(
recognizers : InkRecognizerBase[],
index : int
)
參數
- recognizers
型別:array<System.Windows.Ink.AnalysisCore.InkRecognizerBase[]
一維陣列,這個陣列是從集合複製過來的元素之目的陣列。此陣列必須具有以零起始的索引。
- index
型別:System.Int32
array 中以零起始的索引,位於複製開始的位置。
備註
在下列情況下,會擲回例外狀況:
array 為 null (在 Microsoft Visual Basic .NET 中為 nothing) 參考。
array 為多維。
index 小於零。
index 等於或大於 array 的長度。
集合中的元素數目大於從 index 至 array 結尾的可用空間。
範例
下列範例會將 InkRecognizerBaseCollection (theInkRecognizerCollection) 中的辨識器複製到 InkRecognizerBase 陣列。
' 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.
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0
請參閱
參考
InkRecognizerBaseCollection 類別