Click here to Skip to main content
15,907,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
there is a component for serial port in C# , what about ethernet port or usb port , how can i use these?


What I have tried:

there is a component for serial port in C# , what about ethernet port or usb port , how can i use these?
Posted
Updated 18-Jul-16 4:05am

1 solution

A serial port is dumb. Ethernet and USB have protocole and thus you need to send data in appropriate format. For Ethernet, there are classes in .NET to send and receive data.

See TcpClient TcpClient Class (System.Net.Sockets)[^]. Use Google if you need more examples.

For USB, I don't know... If you want to send serial data over USB (USB-serial adapter), then it would be threated as a serial port.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900