title: C# NullReferenceException with static class
body: <p>I have a static class:    </p>
  
  <pre><code>namespace GVN  
  {  
      static class ClData      
      {  
          public static string cltNM {get; set;}  
      }  
  }    
  </code></pre>
  
  <p>But, when I try to use it,</p>
  
  <pre><code>label_nm.Text = ClData.cltNM;  
  </code></pre>
  
  <p>this error appears: ( <a href="http://msdn.microsoft.com/library/vstudio/sxw2ez55" rel="nofollow">http://msdn.microsoft.com/library/vstudio/sxw2ez55</a> )</p>
  
  <p>Even if I perform this manually:</p>
  
  <pre><code>ClData.cltNM = "12345";    
  </code></pre>
  
  <p>Before:</p>
  
  <pre><code>label_nm.Text = ClData.cltNM;        
  </code></pre>
  
  <p>How can I avoid this error?</p>