CopyTo Method (PrjMessagesCollection)
                In This Topic
            
            Copies the elements of the PrjMessagesCollection to an Array, starting at a particular Array index.
            
            
            Syntax
            
        
            Parameters
- messages
- The one-dimensional Array that is the destination of the elements copied from PrjMessagesCollection. The Array must have zero-based indexing.
- arrayIndex
 
            Exceptions
| Exception | Description | 
|---|
| System.ArgumentNullException | messagesis a null reference (Nothing in Visual Basic). | 
| System.ArgumentOutOfRangeException | arrayIndexis less than 0. | 
| System.ArgumentException | messagesis multidimensional -or-arrayIndexis equal to or greater than the length ofmessages-or-
The number of elements in the sourcePrjMessagesCollectionis greater than the available space fromarrayIndexto the end of the destination array. | 
See Also