title: how to use string in multiple threads
body: <p>So I need to have my IP string to be used by 2 threads of my program. I don't know alot about classes and voids but at the time I have it kind of like this:</p>
  
  <pre><code>    static void Main(string[] args)
      {
          string IP = "127.0.0.1"
      }
  </code></pre>
  
  <p>and I want to use it in another thread:</p>
  
  <pre><code>    static void th1T()
      {
          while (true)
          {
              var ping = new Ping();
              ping.Send(IP);
          }
      }
  </code></pre>
  
  <p>How can I get that to work? I know I am doing something wrong, but don't know what i shall use instead.</p>