ContractDescription.HasProtectionLevel Свойство
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Возвращает значение, указывающее, имеет ли контракт набор уровней защиты.
public:
property bool HasProtectionLevel { bool get(); };
public bool HasProtectionLevel { get; }
member this.HasProtectionLevel : bool
Public ReadOnly Property HasProtectionLevel As Boolean
Значение свойства
true Значение , если уровень защиты установлен; falseв противном случае .
Примеры
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
Комментарии
ProtectionLevel Если задано значение, HasProtectionLevel для свойства задано trueзначение .