Copies all the items from the System.Web.UI.WebControls.RoleGroupCollection collection to a compatible one-dimensional array of System.Web.UI.WebControls.RoleGroup objects, starting at the specified index in the target array.
- array
- A zero-based array of System.Web.UI.WebControls.RoleGroup objects that receives the items copied from the collection.
- index
- The position in the target array at which the array starts receiving the copied items.
Use the RoleGroupCollection.CopyTo(RoleGroup[], int) method to copy the contents of the collection into the specified zero-based array. Items are copied starting at the specified index of the target array. After the items are in an array, you can use array syntax to access the items in the System.Web.UI.WebControls.RoleGroupCollection collection.