Click here to Skip to main content
15,920,111 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi i found an article to get the IP of a PC using c# code(Console Apps) here in this link(A-Machine">How To Get IP Address Of A Machine[^])

But the console closes automatically and i am not able to view the results
Posted
Comments
[no name] 30-Jun-12 8:48am    
Because at the end of the main method the window closes. The ReadLine is just to keep the window open.
Arjun Menon U.K 30-Jun-12 8:49am    
Thanks Wes

Run the program using Ctrl+F5.
 
Share this answer
 
By using Console.ReadKey or Console.ReadLine The Command Prompt launched will be visible until you press a single key or a new a new line
 
Share this answer
 
v2

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