Bagikan melalui


SmtpPermission.Access Properti

Definisi

Mendapatkan tingkat akses ke server SMTP yang dikontrol oleh izin.

public:
 property System::Net::Mail::SmtpAccess Access { System::Net::Mail::SmtpAccess get(); };
public System.Net.Mail.SmtpAccess Access { get; }
member this.Access : System.Net.Mail.SmtpAccess
Public ReadOnly Property Access As SmtpAccess

Nilai Properti

Salah SmtpAccess satu nilai.

Contoh

Contoh kode berikut menunjukkan menampilkan nilai properti ini.

static SmtpPermission^ CreateConnectPermission()
{
    SmtpPermission^ connectAccess = 
        gcnew SmtpPermission(SmtpAccess::Connect);
    Console::WriteLine("Access? {0}", connectAccess->Access);
    return connectAccess;
}
public static SmtpPermission CreateConnectPermission()
{
    SmtpPermission connectAccess = new
        SmtpPermission(SmtpAccess.Connect);
    Console.WriteLine("Access? {0}", connectAccess.Access);
    return connectAccess;
}

Berlaku untuk