SmtpPermission::Copy Method ()

 

Creates and returns an identical copy of the current permission.

Namespace:   System.Net.Mail
Assembly:  System (in System.dll)

public:
virtual IPermission^ Copy() override

Return Value

Type: System.Security::IPermission^

An SmtpPermission that is identical to the current permission.

A copy of a permission represents the same access to resources as the original permission.

The following code example creates copy of a permission object.

static SmtpPermission^ CreatePermissionCopy(SmtpPermission^ p)
{
    SmtpPermission^ copy = (SmtpPermission^) p->Copy();
    return copy;
}

.NET Framework
Available since 2.0
Return to top
Show: