Compartilhar via


ContractDescription.HasProtectionLevel Propriedade

Definição

Obtém um valor que indica se um nível de proteção foi definido para o contrato.

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

Valor da propriedade

Boolean

true se o nível de proteção tiver sido definido; caso contrário, false.

Exemplos

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

Comentários

Quando o ProtectionLevel conjunto é definido, a HasProtectionLevel propriedade é definida como true.

Aplica-se a