Bagikan melalui


MediaPermissionAttribute(SecurityAction) Konstruktor

Definisi

Menginisialisasi instans MediaPermissionAttributebaru .

public:
 MediaPermissionAttribute(System::Security::Permissions::SecurityAction action);
public MediaPermissionAttribute (System.Security.Permissions.SecurityAction action);
new System.Security.Permissions.MediaPermissionAttribute : System.Security.Permissions.SecurityAction -> System.Security.Permissions.MediaPermissionAttribute
Public Sub New (action As SecurityAction)

Parameter

action
SecurityAction

Salah SecurityAction satu nilai.

Contoh

Contoh kode berikut menunjukkan cara membuat MediaPermissionAttribute.

[MediaPermissionAttribute(SecurityAction.Demand)]
<MediaPermissionAttribute(SecurityAction.Demand)>
Public Sub Method12a()
    Dim mpa As New MediaPermissionAttribute(SecurityAction.Demand)
End Sub

Keterangan

Nilai media default adalah AllAudio, NoImage, dan NoVideo.

Berlaku untuk