ContractDescription.HasProtectionLevel Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value that indicates whether the contract has had a protection level set.

Namespace:   System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Public ReadOnly Property HasProtectionLevel As Boolean

Property Value

Type: System.Boolean

true if the protection level has been set; otherwise, false.

When the ProtectionLevel is set, the HasProtectionLevel property is set to true.

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

.NET Framework
Available since 3.0
Return to top
Show: