February 2010 Entries

System.Messaging.Message Plain Text like MSMQ

I'm converting a whole bunch of code from VB6 that uses MSMQ. Instead of using the MSMQ Interop COM libs I'm converting to System.Messaging. There are some message differences. The big difference is the the message body by default is encoded as XML. That's great for the newer projects I'm working on, but the old projects depend on plain text. So how do you create a System.Messaging.Message for plain text. I googled and searched but no simple code snippet in VB. So here is my code UPDATE: The messages ......