Sdílet prostřednictvím


ContractDescription.HasProtectionLevel Vlastnost

Definice

Získá hodnotu, která označuje, zda kontrakt má nastavenou úroveň ochrany.

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

Hodnota vlastnosti

Boolean

truepokud byla nastavena úroveň ochrany; v opačném případě . false

Příklady

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

Poznámky

ProtectionLevel Při nastavení HasProtectionLevel je vlastnost nastavena na true.

Platí pro