Click here to Skip to main content
15,911,711 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi guys, how do i get the host name and port number using C#
Posted
Comments
Christian Graus 21-May-11 15:42pm    
get it from where ? In what context ?

Of WHAT???? Are we supposed to read your mind or something?

If you're talking about a client-side app looking for a server to use, you would normally ask the person for the hostname and port in a couple of textboxes. But, that, of course, depends entirely on what you're talking about.
 
Share this answer
 
Check out RemoteEndPoint[^] under Socket[^] class.
 
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