System.Security.PermissionSet.CopyTo Method

Copies the permission objects of the set to the indicated location in an Array.

Syntax

public virtual void CopyTo (Array array, int index)

Parameters

array
The target array to which to copy.
index
The starting position in the array to begin copying (zero based).

Exceptions

TypeReason
ArgumentException array has more than one dimension.
IndexOutOfRangeException index is outside the range of allowable values for array.
ArgumentNullException array is null.

Remarks

Note: This method is implemented to support the ICollection interface.

Operation
As described above.

The default implementation uses the Array.SetValue(object, int)(object, int) method to add the value to the array.

Note to Inheritors
Override this method to customize the manner in which elements are added to array .

Requirements

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0