title: Using an entire Class as a Parameter - Good practice?
body: <p>Suppose a class called "Place" stores locations and relevant details:</p>
  
  <pre><code>class Place
  {
      string Name;
      string Location;
      // etc...
  }
  </code></pre>
  
  <p>Later on we populate the name and details of up to 80 different towns. So we store these Towns numerically in an array:</p>
  
  <pre><code>class Setup
  {
      public static GetTowns
      {
          for (int i = 1; i &lt;= numberOfTowns; i++)
          {
              Town[i] = new Place(name, location);
          }
          // more code...
      }
      // more methods...
  }
  </code></pre>
  
  <p>To access a specific Town and its data, we pass the Town itself as a parameter and receive it:</p>
  
  <pre><code>public static void DescribeTown(Place Town)
  {
      // example method from some other class
      Console.WriteLine("Shipping to {0}.", Town.Name);
  }
  </code></pre>
  
  <p>Other methods need access multiple towns, or all of them. Then we can pass in the entire Town array as a parameter:</p>
  
  <pre><code>public static void ListAllTowns(Place[] Town)
  {
      Console.WriteLine("Our Beloved Clients:");
      foreach (Place here in Town)
      {
          Console.WriteLine("{0} in {1}", here.Name, here.Location);
          // Various other operations requiring info about the Towns
      }
  }
  </code></pre>
  
  <p><em>The Complete Reference, C# 2.0,</em> states the following</p>
  
  <blockquote>
    <p>Parameters are variables that receive the value of the arguments passed into the method when it is called.</p>
  </blockquote>
  
  <p>This seems to say every instance of a class, and all data involved, is being passed into <code>ListAllTowns</code> each time it is called. That sounds wasteful to me, but is it?</p>
  
  <p>(This example is <em>heavily</em> simplified for proof-of-concept reasons, but methods require read/write permissions and comparison between multiple towns.)</p>