title: "using namespace" problems on DNS and AddressFamily
body: <p>'m a newbie in C# normally my forte is C++ and VB. I have 2 problem in which i have commented on the code:</p>
  
  <p>1.) Blue squiggle lines appear on the 3 Uses it say ""A using namespace directive can only be applied to namespaces; 'System.Object' ... "</p>
  
  <p>2.) i could not get an output IP address from my variable LocalIP in which i declared as public.</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Net;
  
  //Blue squiggly line appear on this 2 Uses
  using Dns = System.Net.Dns;
  using AddressFamily = System.Net.Sockets.AddressFamily;
  
  
  namespace WindowsFormsApplication1
  {
  public partial class frm_Log : Form
  {
      public String localIP;
  
      public string LocalIPAddress()
      {
          IPHostEntry host;
          //string localIP = "";
          host = Dns.GetHostEntry(Dns.GetHostName());
          foreach (IPAddress ip in host.AddressList)
          {
              if (ip.AddressFamily == AddressFamily.InterNetwork)
              {
                  localIP = ip.ToString();
                  break;
              }
          }
          return localIP;
      }
  
      ....
      ....
  
      // variable localIP.Trim() does not giveout any output
      MyValue="LogAccept,"+this.txt_UserName.Text.Trim()+","+this.txt_Password.Text.Trim() + "," + localIP.Trim() ;
  
      ....
      ....
  </code></pre>