title: C# Web Service and Global Variables
body: <p>I'm having a problem getting my global variables to work on my client application.</p>
  
  <p>In the web service, I have the following code:</p>
  
  <pre><code>public class MyWebService: System.Web.Services.WebService
  {
      public static string test = String.Empty;
      ....
  </code></pre>
  
  <p>On my client side I have this code:</p>
  
  <pre><code>MyService.MyWebService client = new MyService.MyWebService()
  {
      client.test="test";
  };
  </code></pre>
  
  <p>On the client side I'm receiving </p>
  
  <blockquote>
    <p>"MyWebService does not contain a definition for test...etc";</p>
  </blockquote>
  
  <p>Can you use global variables within a web service? Any help would be appreciated.</p>
  
  <p>Thanks!   </p>