+ Reply to Thread
Results 1 to 2 of 2

Thread: obtain the NetBIOS and DNS computer names of the local computer

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    10

    obtain the NetBIOS and DNS computer names of the local computer

    I am trying to obtain the NETBIOS and DNS names for a computer , how can i do that in coding ?
    Last edited by sarah; 11-08-2012 at 11:32 PM.

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    22
    Here you are
    Code:
    static string GetLocalHostName ()
    {
       string netBiosName = System.Environment.MachineName;
     
       string dnsName = System.Net.Dns.GetHostName();
       return dnsName;
    }

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts