title: Define private / public type of struct
body: <p>I want to define a variable that will store two parameters — username and access level. In order to do this, I choose to use the struct, that I declare in App.cs file and variable from a type of this struct that I fill-in on success authorization.</p>
  
  <p>Here is some code example:</p>
  
  <pre><code>struct AuthSession
  {
      string username;
      string accessLevel;
  }
  
  public AuthSession userSession;
  </code></pre>
  
  <p>Important! The variable <code>userSession</code> must be accessible from/to all classes in order to supply the ability to check user session each time and in each place I need.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li><p>Should I type <code>private</code> / <code>public</code> in the structure definition? E.g. <code>public struct AuthSession</code> vs. <code>struct AuthSession</code>.</p></li>
  <li><p>If I don't type <code>private</code> / <code>public</code> in the structure definition does it set some encapsulation level by default?</p></li>
  </ol>