ContractDescription.HasProtectionLevel Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft einen Wert ab, der angibt, ob der Vertrag einen Schutzebenensatz festgelegt hat.
public:
property bool HasProtectionLevel { bool get(); };
public bool HasProtectionLevel { get; }
member this.HasProtectionLevel : bool
Public ReadOnly Property HasProtectionLevel As Boolean
Eigenschaftswert
truewenn die Schutzstufe 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 der ProtectionLevel Wert festgelegt wird, wird die HasProtectionLevel Eigenschaft auf true.