CodeParameterDeclarationExpressionCollection.CopyTo Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Kopierar samlingsobjekten till en endimensionell Array instans som börjar vid det angivna indexet.
public:
void CopyTo(cli::array <System::CodeDom::CodeParameterDeclarationExpression ^> ^ array, int index);
public void CopyTo(System.CodeDom.CodeParameterDeclarationExpression[] array, int index);
member this.CopyTo : System.CodeDom.CodeParameterDeclarationExpression[] * int -> unit
Public Sub CopyTo (array As CodeParameterDeclarationExpression(), index As Integer)
Parametrar
Den endimensionella Array som är målet för de värden som kopieras från samlingen.
- index
- Int32
Indexet för matrisen som ska börja infogas.
Undantag
Målmatrisen är flerdimensionell.
-eller-
Antalet element i CodeParameterDeclarationExpressionCollection är större än det tillgängliga utrymmet mellan indexet för målmatrisen som anges av parametern index och slutet av målmatrisen.
Parametern array är null.
Parametern index är mindre än målmatrisens minsta index.
Exempel
I följande exempel visas hur du kopierar innehållet i en CodeParameterDeclarationExpressionCollection till en Array början vid det angivna indexvärdet.
// Copies the contents of the collection beginning at index 0 to the specified CodeParameterDeclarationExpression array.
// 'parameters' is a CodeParameterDeclarationExpression array.
collection.CopyTo( parameters, 0 );
' Copies the contents of the collection beginning at index 0 to the specified CodeParameterDeclarationExpression array.
' 'parameters' is a CodeParameterDeclarationExpression array.
collection.CopyTo(parameters, 0)