[Mono-bugs] [Bug 693370] SerialPort.Open() does not throw an exception if serial port is already open by another application
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu May 12 08:56:31 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=693370
https://bugzilla.novell.com/show_bug.cgi?id=693370#c1
--- Comment #1 from Brennen Ball <brennen at diyembedded.com> 2011-05-12 12:56:31 UTC ---
I noticed a problem in the above code snippet. It should read:
void TestFunc()
{
SerialPort serPort = new SerialPort();
serPort.PortName = "/dev/ttyS0";
try
{
serPort.Open();
MessageBox.Show(serPort.PortName + " opened successfully");
if (serPort.IsOpen)
{
serPort.Close();
}
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list