code for IP detection on LAN
-
-
hi, This is mitesh doing engineering in IT. I need help do to the project for finding out the IP Address on LAN. The code must be in C# preferably. If you can help please mail the code at mitesh_487@rediffmail.com thank you, please do it urgently.
-
hi, This is mitesh doing engineering in IT. I need help do to the project for finding out the IP Address on LAN. The code must be in C# preferably. If you can help please mail the code at mitesh_487@rediffmail.com thank you, please do it urgently.
namespace NKUtilities
{
using System;
using System.Net;public class DNSUtility { public static int Main (string \[\] args) { String strHostName = new String (""); if (args.Length == 0) { // Getting Ip address of local machine... // First get the host name of local machine. strHostName = Dns.GetHostName (); Console.WriteLine ("Local Machine's Host Name: " + strHostName); } else { strHostName = args\[0\]; } // Then using host name, get the IP address list.. IPHostEntry ipEntry = DNS.GetHostByName (strHostName); IPAddress \[\] addr = ipEntry.AddressList; for (int i = 0; i < addr.Length; i++) { Console.WriteLine ("IP Address {0}: {1} ", i, addr\[i\].ToString ()); } return 0; } }
}
-
hi, This is mitesh doing engineering in IT. I need help do to the project for finding out the IP Address on LAN. The code must be in C# preferably. If you can help please mail the code at mitesh_487@rediffmail.com thank you, please do it urgently.
mitesh_487 wrote:
This is mitesh doing engineering in IT.
And soon you will be working for some IT company without any knowledge. And flooding forums with "send me code" type questions.
mitesh_487 wrote:
I need help do to the project for finding out the IP Address on LAN. The code must be in C# preferably.
Is this what you call help?
mitesh_487 wrote:
If you can help please mail the code at mitesh_487@rediffmail.com
Great going. What do you expect to learn like this?
Happy Holi[^] जय हिंद
-
namespace NKUtilities
{
using System;
using System.Net;public class DNSUtility { public static int Main (string \[\] args) { String strHostName = new String (""); if (args.Length == 0) { // Getting Ip address of local machine... // First get the host name of local machine. strHostName = Dns.GetHostName (); Console.WriteLine ("Local Machine's Host Name: " + strHostName); } else { strHostName = args\[0\]; } // Then using host name, get the IP address list.. IPHostEntry ipEntry = DNS.GetHostByName (strHostName); IPAddress \[\] addr = ipEntry.AddressList; for (int i = 0; i < addr.Length; i++) { Console.WriteLine ("IP Address {0}: {1} ", i, addr\[i\].ToString ()); } return 0; } }
}
Jack - you're it is not recommended that you feed these idiots with code, see d@nishes post, it is quite relevant. Heaping scorn is a more appropriate answer. Giving a clue to where to look is even better eg point the idiot to the
using System.Net;
library, feeding an idiot code only encourages them.Never underestimate the power of human stupidity RAH
-
namespace NKUtilities
{
using System;
using System.Net;public class DNSUtility { public static int Main (string \[\] args) { String strHostName = new String (""); if (args.Length == 0) { // Getting Ip address of local machine... // First get the host name of local machine. strHostName = Dns.GetHostName (); Console.WriteLine ("Local Machine's Host Name: " + strHostName); } else { strHostName = args\[0\]; } // Then using host name, get the IP address list.. IPHostEntry ipEntry = DNS.GetHostByName (strHostName); IPAddress \[\] addr = ipEntry.AddressList; for (int i = 0; i < addr.Length; i++) { Console.WriteLine ("IP Address {0}: {1} ", i, addr\[i\].ToString ()); } return 0; } }
}
-
mitesh_487 wrote:
This is mitesh doing engineering in IT.
And soon you will be working for some IT company without any knowledge. And flooding forums with "send me code" type questions.
mitesh_487 wrote:
I need help do to the project for finding out the IP Address on LAN. The code must be in C# preferably.
Is this what you call help?
mitesh_487 wrote:
If you can help please mail the code at mitesh_487@rediffmail.com
Great going. What do you expect to learn like this?
Happy Holi[^] जय हिंद