Bagikan melalui


FileIOPermission.AllFiles Properti

Definisi

Mendapatkan atau mengatur akses yang diizinkan ke semua file.

public:
 property System::Security::Permissions::FileIOPermissionAccess AllFiles { System::Security::Permissions::FileIOPermissionAccess get(); void set(System::Security::Permissions::FileIOPermissionAccess value); };
public System.Security.Permissions.FileIOPermissionAccess AllFiles { get; set; }
member this.AllFiles : System.Security.Permissions.FileIOPermissionAccess with get, set
Public Property AllFiles As FileIOPermissionAccess

Nilai Properti

Kumpulan bendera I/O file untuk semua file.

Contoh

Contoh kode berikut menunjukkan penggunaan AllFiles properti .

FileIOPermission^ f3 = gcnew FileIOPermission( PermissionState::None );
f->AllFiles = FileIOPermissionAccess::Read;
try
{
    f3->Demand();
}
catch (SecurityException^ s)
{
    Console::WriteLine(s->Message);
}
FileIOPermission f3 = new FileIOPermission(PermissionState.None);
f3.AllFiles = FileIOPermissionAccess.Read;
try
{
    f3.Demand();
}
catch (SecurityException s)
{
    Console.WriteLine(s.Message);
}
Dim f3 As New FileIOPermission(PermissionState.None)
f3.AllFiles = FileIOPermissionAccess.Read
Try
    f3.Demand()
Catch s As SecurityException
    Console.WriteLine(s.Message)
End Try

Keterangan

Properti ini mendapatkan atau menyetel akses yang diizinkan ke semua file pada komputer lokal dan kandar jaringan.

Nilai individual FileIOPermissionAccess dapat diperiksa untuk menggunakan operasi AND bitwise.

Berlaku untuk