SerialPort.GetPortNames()

Discussion in 'C#' started by Fritz.fx, Sep 5, 2010.

  1. Fritz.fx

    Fritz.fx New Member

    Joined:
    Sep 5, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi all. I'm using this seemingly simple code (from msdn) to fill a combobox with available Com ports but it keeps adding this strange character at the end of it, like so "COM4?"

    It was working fine yesterday, but it started doing it after a reboot and no change to the code.

    foreach (string s in System.IO.Ports.SerialPort.GetPortNames())
    Combobox1.Items.Add(s);
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice