title: How do I make an arraylist public
body: <p>In File1 I created a class with 3 strings. I created another class with a public arraylist. I want this arraylist to be dynamic and the object it contains are the class with the 3 strings.
  I can access the members of the class in the file but not in a separate file.</p>
  
  <p>file1</p>
  
  <pre><code>public class SensorCollection
      {
          public string ipAddress;
          public string portNumber;   
          public string physicalLocation;
  
          public DetectorCollection(string ipAddr, string portNum, string loc)
          {
              this.ipAddress = ipAddr;
              this.portNumber = portNum;
              this.physicalLocation = loc;
  
          }
      }
      public class SensorCollectionArray
      {
          public System.Collections.ArrayList SensorArrayList;
      }
  
  ...
  System.Collections.ArrayList DetectorArrayList = new System.Collections.ArrayList(); 
  ...
    DetectorArrayList.Add(new DetectorCollection(ipAddress, portNum, str));
  </code></pre>
  
  <p>So I can fill the array of classes but can't access it in a separate file.
  File 2</p>
  
  <pre><code>    AdvancedSettingsForm.SensorCollectionArray mainDetectorCollectionArray;
      System.Collections.ArrayList arrList;
  </code></pre>