Freigeben über


ContractDescription.HasProtectionLevel Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob für den Vertrag eine Schutzebene festgelegt ist.

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

Eigenschaftswert

Boolean

true, wenn die Schutzebene festgelegt wurde, andernfalls false.

Beispiele

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

Hinweise

Wenn ProtectionLevel festgelegt ist, ist die HasProtectionLevel-Eigenschaft auf true festgelegt.

Gilt für