CodeAccessPermission.copy Method

Creates and returns a copy of a permission class object.

Syntax

public abstract CodeAccessPermission copy()

Run On

Called

Return Value

Type: CodeAccessPermission Class
A copy of the derived class object.

Remarks

You can override this method as part of the process of making an API more secure.

Examples

The following code example shows how to override the copy method to create and return a copy of a class that is derived from the CodeAccessPermission class.

public CodeAccessPermission copy() 
{ 
    return new SysTestCodeAccessPermission(_data); 
}

See Also

CodeAccessPermission Class

CodeAccessPermission Class