View Single Post
ישן 26-08-07, 21:23   # 2
X-T
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Jan 2007
הודעות: 1,021

X-T לא מחובר  

נסה את זה
PHP קוד:
namespace NKUtilities 
{
    
using System;
    
using System.Net;
    
    public class 
DNSUtility
    
{
        public static 
int Main (string [] args)
        {
        
          
String strHostName = new String ("");
          if (
args.Length == 0)
          {
              
strHostName DNS.GetHostName ();
              
Console.WriteLine ("Local Machine's Host Name: " +  strHostName);
          }
          else
          {
              
strHostName args[0];
          }
          
          
IPHostEntry ipEntry DNS.GetHostByName (strHostName);
          
IPAddress [] addr ipEntry.AddressList;
          
          for (
int i 0addr.Lengthi++)
          {
              
Console.WriteLine ("IP Address {0}: {1} "iaddr[i].ToString ());
          }
          return 
0;
        }    
     }

__________________
You don't shine if you don't glow
  Reply With Quote