Share via


InteropPermission.new Method

Creates an new instance of the InteropPermission class.

Syntax

public void new(InteropKind kind)

Run On

Called

Parameters

  • kind
    Type: InteropKind Enumeration
    An InteropKind system enumeration value that specifies access to managed or unmanaged code.

Examples

The following code example shows a new instance of the InteropPermission class that specifies access to Win32 MicrosoftWindows dynamic-link libraries (DLLs).

server static void main(Args args) 
{ 
    InteropPermission _perm; 
     
    _perm = new InteropPermission(InteropKind::DllInterop); 
}

See Also

Reference

InteropPermission Class