title: Using a private variable in a public property getter
body: <p>If I have a public property that only has a getter, is it correct to use a private variable to assign the value to then return that value or should I just use <code>return</code> rather then setting the value of <code>userID</code>? In the future we plan to add more functionality that will use the userID field, and Methods will be added to this class that use the userID field. Is there any benefit to one way or the other? Is there some other way that this should be done?</p>
  
  <pre><code>    private string userID;
      public string ID
      {
          get
          {
              if (System.Web.HttpContext.Current.Request.Headers.AllKeys.Contains("UID"))
              {
                  userID = System.Web.HttpContext.Current.Request.Headers["UID"].ToString();
              }
              else
              {
                  userID = "0000";
              }
              return userID;
          }
      }
  </code></pre>