title: How can I share values across classes (or get a variable from another class) without instantiating twice.
body: <p>My problem is the following, I have a class, let's call it <code>Theatre</code>.</p>
  
  <p>This <code>Theatre</code> has a constructor where I specify the amount <code>Seats</code> that this <code>Theatre</code> has.</p>
  
  <p>The <code>Show</code> class, has an collection of <code>Seats</code>, each with its own properties like <code>bool Empty</code>.</p>
  
  <p>So summing up the code:</p>
  
  <pre><code>class Theatre
  {
      public Theatre(int numberOfSeats)
      {
          this.numberOfSeats = numberOfSeats;
      }
  }
  </code></pre>
  
  <p>Lets say we instantiate it somewhere to <code>100</code>.</p>
  
  <pre><code>Theatre myTheatre = new Theatre(100);
  </code></pre>
  
  <p>For the <code>Show</code> class:</p>
  
  <pre><code>class Show
  {
      List&lt;Seats&gt; listOfSeats = new List&lt;Seats&gt;();
      public Show()
      {
          for (int i = 0; i &lt; 100; i++) //  &lt;---- And here is my problem!!
          {
              //Code to add to list
          }
      }
  }
  </code></pre>
  
  <p>My problem is I don't know to get rid of that <code>100</code>.</p>
  
  <p>I would like to have something like myTheatre.NumberOfSeats, but I'm not really sure how would that work.</p>
  
  <p>My problem is, I have already instantiated myTheatre in another class, so I would have to make a new theatre inside <code>Show</code>, only to get the number of seats, I would use something like composition and deletagation, but that would clearly violate ISP.</p>
  
  <p>But even that has a problem, since, when I make the new <code>Theatre</code>, I would have to put <code>100</code> as a paratmer and, if that were to change, I would have to manually change it.</p>
  
  <p>So my questions are:</p>
  
  <ul>
  <li>Am I missing something obvious? (Very likely)</li>
  <li>What approach would you recommend?</li>
  <li>Is there something like a shared variable across classes? (Don't want to use the word global, because I'm not sure that's what I want, but it might).</li>
  </ul>
  
  <p>As an obvious clarification, the above is not the actual code, just a representation to clarify the situation.</p>