OpenserialPort or serialPort.open?

  • Thread starter Thread starter Rof
  • Start date Start date
R

Rof

Can anyone tell me what is the best (not necessarily Microsoft's
"preferred" way) of using serial ports, now that we at last have
serial port objects in .NET? Should I use
My.Computer.Ports.OpenSerialPort, as MS seem to recommend, or use the
way that seems more intuitive and logical, Ports.SerialPort.Open? The
first one is not very well explained - it seems to imply that if you
do that with "COM1" as the port name, you then have an object "com1"
which can then be used, but it's not all specific or clear.

TIA

Peter Royle
 
Hi,

I don't bother with the My namespace for serial ports. My simplifies some
things, but not serial IO (IMO).

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Can anyone tell me what is the best (not necessarily Microsoft's
"preferred" way) of using serial ports, now that we at last have
serial port objects in .NET? Should I use
My.Computer.Ports.OpenSerialPort, as MS seem to recommend, or use the
way that seems more intuitive and logical, Ports.SerialPort.Open? The
first one is not very well explained - it seems to imply that if you
do that with "COM1" as the port name, you then have an object "com1"
which can then be used, but it's not all specific or clear.

TIA

Peter Royle

Dick Grier, you seem to have replied to this, but there seems to be no
content in it! Want to try again?

Rof
 
Back
Top