ContractDescription.HasProtectionLevel Właściwość

Definicja

Pobiera wartość wskazującą, czy kontrakt miał ustawiony poziom ochrony.

public:
 property bool HasProtectionLevel { bool get(); };
public bool HasProtectionLevel { get; }
member this.HasProtectionLevel : bool
Public ReadOnly Property HasProtectionLevel As Boolean

Wartość właściwości

Boolean

true jeśli poziom ochrony został ustawiony; w przeciwnym razie , false.

Przykłady

bool hasProtectionLevel = cd.HasProtectionLevel;
if (hasProtectionLevel)
{
    ProtectionLevel protectionLevel = cd.ProtectionLevel;
    Console.WriteLine("\tProtection Level: {0}", protectionLevel.ToString());
}
Dim hasProtectionLevel As Boolean = cd.HasProtectionLevel
If hasProtectionLevel Then
    Dim protectionLevel As ProtectionLevel = cd.ProtectionLevel
    Console.WriteLine(Constants.vbTab & "Protection Level: {0}", protectionLevel.ToString())
End If

Uwagi

Gdy właściwość ProtectionLevel jest ustawiona, właściwość jest ustawiona HasProtectionLevel na truewartość .

Dotyczy