Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8386747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:01:35+00:00 2026-06-09T18:01:35+00:00

I installed a device on my computer (for example a cardreader). I ran this

  • 0

I installed a device on my computer (for example a cardreader). I ran this code but the ComboBox was not filled.

Code:

using System.Management;
using System.IO.Ports;

foreach (string portname in SerialPort.GetPortNames())
        {
            comboBox1.Items.Add(portname);
        }

Since this didn’t work, how can I see the port addresses and properties of the devices installed on the computer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:01:36+00:00Added an answer on June 9, 2026 at 6:01 pm

    The GetPortNames() function provides a list of the serial port names see GetPortNames() page which are not sockets.

    Here is documentation on the SerialPort class which has methods that you can use to determine the properties of a particular serial port including baud rate, etc. I suspect that the basic outline of what you want is to use the SerialPort.GetPortNames() method to generate a list of port names and to then use the SerialPort (String) to interogate the properties of the specific port as you iterate through the list of ports provided by GetPortNames().

    If it is actually sockets you are interested in, you may want to know a list of well know TCP and UDP ports however like the pirate’s code these are more like guidelines than actual rules and what is actually on a port may not be what the standard usage documents. It depends on what software is running and how the software is configured. I do not know of any way of knowing what service may be using a particular port other than going by the standard list, sending a service specific query to the port, or to use a utility such as netstat to generate a list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Facebook app installed on my device for posting data on
I have MAMP installed on my Mac with OS X 10.6. This computer's name
How do I detect if the system has a default recording device installed? I
How i can display all applications icons and name which are installed in device
I want to update an apk file already installed in the device programmatically to
I have recently installed iOS 6 beta on my device and updated to the
How do I prevent my device administration application from being installed? I have created
I need to launch/open one installed apk in my device from a BroadcastReceiver. Here
to know which Apps are installed on a given device i have followed the
I have an embedded device running busybox . The device has crond installed and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.