ContractDescription.HasProtectionLevel Propriété

Définition

Obtient une valeur qui indique si un niveau de protection a été défini pour le contrat.

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

Valeur de propriété

Boolean

true si le niveau de protection a été défini ; sinon, false.

Exemples

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

Remarques

Lorsque ProtectionLevel est défini, la propriété HasProtectionLevel a la valeur true.

S’applique à