System.Messaging Reference (Document! X Sample)



System.Messaging Namespace > Message Class : UseEncryption Property
UseEncryption Property (Message)
Gets or sets a value that indicates whether to make the message private.
Syntax
'Declaration
 
<MessagingDescriptionAttribute("Set this property to have MSMQ encrypt a private message.")>
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
<ReadOnlyAttribute(True)>
Public Property UseEncryption As Boolean
'Usage
 
Dim instance As Message
Dim value As Boolean
 
instance.UseEncryption = value
 
value = instance.UseEncryption
[MessagingDescription("Set this property to have MSMQ encrypt a private message.")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
public bool UseEncryption {get; set;}
[MessagingDescription("Set this property to have MSMQ encrypt a private message.")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[ReadOnly(true)]
public:
property bool UseEncryption {
   bool get();
   void set (    bool value);
}

Property Value

true to require Message Queuing to encrypt the message; otherwise, false. The default is false.
Exceptions
ExceptionDescription
The message queue is filtered to ignore the UseEncryption property.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also