From VB to Csharp

C

cfyam

How can I convert the VB 6 statement below to C#?
MSComm1.Output = Chr(&H1B) + "I" & Chr(13)
 
L

Lowell Heddings

cfyam said:
How can I convert the VB 6 statement below to C#?
MSComm1.Output = Chr(&H1B) + "I" & Chr(13)

MSComm1.Output = Convert.ToChar(27) + "I" + Convert.ToChar(13);

That works... might not be the best way to do it, though. You could also
do it this way:

MSComm1.Output = (char)27 + "I" + (char)13;

Lowell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top