Converting C# to

I had one reader from Germany contact me regarding porting a sample section of my blog posting on using the MpApi in .Net.  Unfortunately, I don't use that often and my time to port it to is limited, however I found a great online tool that can do this for you. has a nice tool, ConvertCSharp2VB. It's rather simple, you copy and paste C# code into the form and it spits out the same code on  Here's the sample in C# and that I used:

C# Sample
SmsMessagingClass messaging = new SmsMessagingClass();
ISmsMessage4 message, reply;
smsMessaging.CreateMessage(out message);

// Send the message using HTTP
messaging.Invoke("http://myHostname", message, out reply);

// Do something with the reply here...

VB.Net Sample
Dim messaging As SmsMessagingClass =  New SmsMessagingClass()
Dim message As ISmsMessage4,reply As ISmsMessage4
smsMessaging.CreateMessage( message)
' Send the message using HTTP
messaging.Invoke("http://myHostname",message,out reply)
' Do something with the reply here...